Use UUIDs in group database schema

This commit is contained in:
Fedor Indutny 2021-10-26 15:59:08 -07:00 committed by GitHub
parent 74fde10ff5
commit 63fcdbe787
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 4530 additions and 3664 deletions

View file

@ -5,11 +5,10 @@ import { assert } from 'chai';
import type { ConversationType } from '../../state/ducks/conversations';
import { MemberRepository } from '../../quill/memberRepository';
import { getDefaultConversation } from '../../test-both/helpers/getDefaultConversation';
import { getDefaultConversationWithUuid } from '../../test-both/helpers/getDefaultConversation';
const memberMahershala: ConversationType = getDefaultConversation({
const memberMahershala: ConversationType = getDefaultConversationWithUuid({
id: '555444',
uuid: 'abcdefg',
title: 'Pal',
firstName: 'Mahershala',
profileName: 'Mr Ali',
@ -20,9 +19,8 @@ const memberMahershala: ConversationType = getDefaultConversation({
areWeAdmin: false,
});
const memberShia: ConversationType = getDefaultConversation({
const memberShia: ConversationType = getDefaultConversationWithUuid({
id: '333222',
uuid: 'hijklmno',
title: 'Buddy',
firstName: 'Shia',
profileName: 'Sr LaBeouf',
@ -35,9 +33,8 @@ const memberShia: ConversationType = getDefaultConversation({
const members: Array<ConversationType> = [memberMahershala, memberShia];
const singleMember: ConversationType = getDefaultConversation({
const singleMember: ConversationType = getDefaultConversationWithUuid({
id: '666777',
uuid: 'pqrstuv',
title: 'The Guy',
firstName: 'Jeff',
profileName: 'Jr Klaus',
@ -85,7 +82,7 @@ describe('MemberRepository', () => {
it('returns a matched member', () => {
const memberRepository = new MemberRepository(members);
assert.isDefined(memberRepository.getMemberByUuid('abcdefg'));
assert.isDefined(memberRepository.getMemberByUuid(memberMahershala.uuid));
});
it('returns undefined when it does not have the member', () => {