Skip to content

Commit

Permalink
chore: remove irrelevant test
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykBuniX committed May 13, 2024
1 parent 65e18aa commit 45a5a56
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/script/conversation/ConversationRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,37 +346,6 @@ describe('ConversationRepository', () => {
const conversationEntity = await conversationRepository.init1to1Conversation(proteus1to1Conversation2, true);
expect(conversationEntity).toEqual(proteus1to1Conversation2);
});

it('just returns a proteus conversation with a bot/service', async () => {
const conversationRepository = testFactory.conversation_repository!;
const userRepository = testFactory.user_repository!;

const otherUserId = {id: 'f718410c-1733-479d-bd80-af03f38416', domain: 'test-domain'};
const otherUser = new User(otherUserId.id, otherUserId.domain);
otherUser.isService = true;
otherUser.supportedProtocols([ConversationProtocol.PROTEUS]);

userRepository['userState'].users.push(otherUser);

const selfUserId = {id: '109da9ca-a417-47a870-9ffbe924b2d1', domain: 'test-domain'};
const selfUser = new User(selfUserId.id, selfUserId.domain);
selfUser.supportedProtocols([ConversationProtocol.PROTEUS, ConversationProtocol.MLS]);
jest.spyOn(conversationRepository['userState'], 'self').mockReturnValueOnce(selfUser);

const proteus1to1Conversation = _generateConversation({
type: CONVERSATION_TYPE.REGULAR,
protocol: ConversationProtocol.PROTEUS,
overwites: {team_id: 'teamId'},
});

proteus1to1Conversation.participating_user_ids([otherUserId]);
proteus1to1Conversation.participating_user_ets([otherUser]);

jest.spyOn(conversationRepository['conversationService'], 'getMLS1to1Conversation');

const conversationEntity = await conversationRepository.init1to1Conversation(proteus1to1Conversation, true);
expect(conversationEntity).toEqual(proteus1to1Conversation);
});
});

describe('getInitialised1To1Conversation', () => {
Expand Down

0 comments on commit 45a5a56

Please sign in to comment.