From d875c1c3e802a0a93f6ba1f701db1e0e60807882 Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Thu, 1 Dec 2022 13:08:05 -0500 Subject: [PATCH] Fix tests --- .../components/chat-page/__tests__/chat-page.test.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/soapbox/features/chats/components/chat-page/__tests__/chat-page.test.tsx b/app/soapbox/features/chats/components/chat-page/__tests__/chat-page.test.tsx index 38abb4a6a..ddac6c8bc 100644 --- a/app/soapbox/features/chats/components/chat-page/__tests__/chat-page.test.tsx +++ b/app/soapbox/features/chats/components/chat-page/__tests__/chat-page.test.tsx @@ -20,12 +20,14 @@ describe('', () => { }); describe('when you complete onboarding', () => { + const id = '1'; + beforeEach(() => { store = { - me: '1', + me: id, accounts: ImmutableMap({ - '1': normalizeAccount({ - id: '1', + [id]: normalizeAccount({ + id, acct: 'justin-username', display_name: 'Justin L', avatar: 'test.jpg', @@ -37,7 +39,7 @@ describe('', () => { __stub((mock) => { mock .onPatch('/api/v1/accounts/update_credentials') - .reply(200, { chats_onboarded: true, id: 1 }); + .reply(200, { chats_onboarded: true, id }); }); });