actions/accounts: remove n/a test

chats-fixes
Alex Gleason 2022-06-08 16:18:51 -05:00
rodzic 1aef2eaf22
commit 53cb5f723b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 15 dodań i 25 usunięć

Wyświetl plik

@ -148,34 +148,24 @@ describe('fetchAccountByUsername()', () => {
const username = 'tiger';
let state, account;
describe('when the account has already been cached in redux', () => {
beforeEach(() => {
account = normalizeAccount({
id,
acct: username,
display_name: 'Tiger',
avatar: 'test.jpg',
birthday: undefined,
});
state = rootReducer(undefined, {})
.set('accounts', ImmutableMap({
[id]: account,
}));
store = mockStore(state);
__stub((mock) => {
mock.onGet(`/api/v1/accounts/${id}`).reply(200, account);
});
beforeEach(() => {
account = normalizeAccount({
id,
acct: username,
display_name: 'Tiger',
avatar: 'test.jpg',
birthday: undefined,
});
it('should return null', async() => {
const result = await store.dispatch(fetchAccountByUsername(username));
const actions = store.getActions();
state = rootReducer(undefined, {})
.set('accounts', ImmutableMap({
[id]: account,
}));
expect(actions).toEqual([]);
expect(result).toBeNull();
store = mockStore(state);
__stub((mock) => {
mock.onGet(`/api/v1/accounts/${id}`).reply(200, account);
});
});