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 { __stub } from 'soapbox/api';
|
||||||
import { mockStore, rootState } from 'soapbox/jest/test-helpers';
|
import { mockStore, rootState } from 'soapbox/jest/test-helpers';
|
||||||
|
import { AccountRecord } from 'soapbox/normalizers';
|
||||||
|
|
||||||
import { AuthUserRecord, ReducerRecord } from '../../reducers/auth';
|
import { AuthUserRecord, ReducerRecord } from '../../reducers/auth';
|
||||||
import {
|
import {
|
||||||
|
@ -48,9 +49,9 @@ describe('fetchMe()', () => {
|
||||||
}),
|
}),
|
||||||
}))
|
}))
|
||||||
.set('accounts', ImmutableMap({
|
.set('accounts', ImmutableMap({
|
||||||
[accountUrl]: {
|
[accountUrl]: AccountRecord({
|
||||||
url: accountUrl,
|
url: accountUrl,
|
||||||
},
|
}),
|
||||||
}) as any);
|
}) as any);
|
||||||
store = mockStore(state);
|
store = mockStore(state);
|
||||||
});
|
});
|
||||||
|
|
|
@ -49,7 +49,7 @@ export const getAuthUserId = (state: RootState) => {
|
||||||
return ImmutableList([
|
return ImmutableList([
|
||||||
state.auth.users.get(me!)?.id,
|
state.auth.users.get(me!)?.id,
|
||||||
me,
|
me,
|
||||||
]).find(validId);
|
].filter(id => id)).find(validId);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getAuthUserUrl = (state: RootState) => {
|
export const getAuthUserUrl = (state: RootState) => {
|
||||||
|
|
Loading…
Reference in New Issue