Sha256: 7df835c08e0a374e2e7d0003bece83a46e3e9ff4bcbbced8510c61726fb7531a
Contents?: true
Size: 1.17 KB
Versions: 3
Compression:
Stored size: 1.17 KB
Contents
import * as types from '../ManifestConstants'; import { manifestHistoryInitialState, manifestHistoryLoadingState, manifestHistorySuccessResponse, manifestHistorySuccessState, manifestHistoryErrorState, } from './manifest.fixtures'; import reducer from '../ManifestHistoryReducer'; describe('manifest history reducer', () => { it('should return the initial state', () => { expect(reducer(undefined, {})).toEqual(manifestHistoryInitialState); }); it('should keep loading state on MANIFEST_HISTORY_REQUEST', () => { expect(reducer(manifestHistoryInitialState, { type: types.MANIFEST_HISTORY_REQUEST, })).toEqual(manifestHistoryLoadingState); }); it('should flatten response MANIFEST_HISTORY_SUCCESS', () => { expect(reducer(manifestHistoryInitialState, { type: types.MANIFEST_HISTORY_SUCCESS, response: manifestHistorySuccessResponse, })).toEqual(manifestHistorySuccessState); }); it('should have error on MANIFEST_HISTORY_FAILURE', () => { expect(reducer(manifestHistoryInitialState, { type: types.MANIFEST_HISTORY_FAILURE, error: 'Unable to process request.', })).toEqual(manifestHistoryErrorState); }); });
Version data entries
3 entries across 3 versions & 1 rubygems