Sha256: a358b0c967997a34cd42fccb8b2faaa289f2b4368c9b97ef602e1fefcac6eac9
Contents?: true
Size: 899 Bytes
Versions: 1
Compression:
Stored size: 899 Bytes
Contents
import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils'; import { TASKS_TABLE_ID, TASKS_TABLE_SET_SORT, TASKS_TABLE_SET_PAGINATION, } from '../TasksTableConstants'; import reducer from '../TasksTableReducer'; const fixtures = { 'should return the initial state': {}, 'should handle TASKS_TABLE_SUCCESS': { action: { type: `${TASKS_TABLE_ID}_SUCCESS`, payload: { subtotal: 120, page: 3, per_page: 12, }, }, }, 'should handle TASKS_TABLE_SET_SORT': { action: { type: TASKS_TABLE_SET_SORT, payload: { by: 'a', order: 'b' }, }, }, 'should handle TASKS_TABLE_SET_PAGINATION': { action: { type: TASKS_TABLE_SET_PAGINATION, payload: { page: 4, perPage: 7 }, }, }, }; describe('TasksTablePaginationReducer reducer', () => testReducerSnapshotWithFixtures(reducer, fixtures));
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
foreman-tasks-0.17.1 | webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableReducer.test.js |