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