Fix test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
1cc0b16274
commit
3491d09485
|
@ -2,6 +2,7 @@ import { Map as ImmutableMap } from 'immutable';
|
|||
|
||||
import { __stub } from 'soapbox/api';
|
||||
import { mockStore, rootState } from 'soapbox/jest/test-helpers';
|
||||
import { AccountRecord } from 'soapbox/normalizers';
|
||||
|
||||
import { AuthUserRecord, ReducerRecord } from '../../reducers/auth';
|
||||
import {
|
||||
|
@ -48,9 +49,9 @@ describe('fetchMe()', () => {
|
|||
}),
|
||||
}))
|
||||
.set('accounts', ImmutableMap({
|
||||
[accountUrl]: {
|
||||
[accountUrl]: AccountRecord({
|
||||
url: accountUrl,
|
||||
},
|
||||
}),
|
||||
}) as any);
|
||||
store = mockStore(state);
|
||||
});
|
||||
|
|
|
@ -49,7 +49,7 @@ export const getAuthUserId = (state: RootState) => {
|
|||
return ImmutableList([
|
||||
state.auth.users.get(me!)?.id,
|
||||
me,
|
||||
]).find(validId);
|
||||
].filter(id => id)).find(validId);
|
||||
};
|
||||
|
||||
export const getAuthUserUrl = (state: RootState) => {
|
||||
|
|
Loading…
Reference in New Issue