Sha256: 80c7f2baae6f29ac3f704c975ea03aff06ea885eb446a0ac2a38f4a200e49748
Contents?: true
Size: 1.04 KB
Versions: 166
Compression:
Stored size: 1.04 KB
Contents
import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils'; import * as types from '../TableConstants'; import { requestSuccessResponse, tableRecord, } from './Table.fixtures'; import reducer from '../TableReducer'; const fixtures = { 'should return the initial state': {}, 'should keep loading state on TABLES_REQUEST': { action: { type: types.TABLES_REQUEST, }, }, 'should pull table list from response TABLES_SUCCESS': { action: { type: types.TABLES_SUCCESS, payload: (requestSuccessResponse), }, }, 'should have error on TABLE_REQUEST_FAILURE': { action: { type: types.TABLES_FAILURE, }, }, 'should create response for CREATE_TABLE_SUCCESS': { action: { type: types.CREATE_TABLE_SUCCESS, payload: [tableRecord], }, }, 'should update response UPDATE_TABLE_SUCCESS': { action: { type: types.UPDATE_TABLE_SUCCESS, payload: [tableRecord], }, }, }; describe('Tables reducer', () => testReducerSnapshotWithFixtures(reducer, fixtures));
Version data entries
166 entries across 166 versions & 1 rubygems