2021-06-06 19:49:38 +03:00
|
|
|
import reducer, {
|
|
|
|
APP_UPDATE_AVAILABLE,
|
|
|
|
RESET_APP_UPDATE,
|
|
|
|
appUpdateAvailable,
|
|
|
|
resetAppUpdate,
|
|
|
|
} from '../../../src/app/reducers/appUpdates';
|
|
|
|
|
|
|
|
describe('appUpdatesReducer', () => {
|
|
|
|
describe('reducer', () => {
|
|
|
|
it('returns true on APP_UPDATE_AVAILABLE', () => {
|
|
|
|
expect(reducer(undefined, { type: APP_UPDATE_AVAILABLE })).toEqual(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('returns false on RESET_APP_UPDATE', () => {
|
|
|
|
expect(reducer(undefined, { type: RESET_APP_UPDATE })).toEqual(false);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('appUpdateAvailable', () => {
|
2021-09-20 23:00:34 +03:00
|
|
|
it('creates expected action', () => {
|
2021-06-06 19:49:38 +03:00
|
|
|
expect(appUpdateAvailable()).toEqual({ type: APP_UPDATE_AVAILABLE });
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('resetAppUpdate', () => {
|
2021-09-20 23:00:34 +03:00
|
|
|
it('creates expected action', () => {
|
2021-06-06 19:49:38 +03:00
|
|
|
expect(resetAppUpdate()).toEqual({ type: RESET_APP_UPDATE });
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|