Sha256: 7e8fb888f7cb93b4db36d020ddfb5e2fd557ac43e635a0bd69c08fb3a2cf8529
Contents?: true
Size: 1.14 KB
Versions: 12
Compression:
Stored size: 1.14 KB
Contents
import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils'; import reducer, { initialState } from '../TemplateSyncResultReducer'; import { importTemplates } from '../__fixtures__/templateSyncResult.fixtures'; import { TEMPLATESYNC_FORM_SUBMITTED, SYNC_RESULT_PAGINATION_CHANGE, } from '../../../consts'; const fixtures = { 'should return initial state': { state: initialState, action: { type: undefined, payload: {}, }, }, 'should set new pagination': { state: initialState, action: { type: SYNC_RESULT_PAGINATION_CHANGE, payload: { pagination: { page: 2, perPage: 5, }, }, }, }, 'should update state when form submitted': { state: initialState, action: { type: TEMPLATESYNC_FORM_SUBMITTED, payload: { data: { templates: importTemplates, repo: 'https://github.com/theforeman/community-templates.git', branch: 'master', result_action: 'import', }, }, }, }, }; describe('TemplateSyncResultReducer', () => testReducerSnapshotWithFixtures(reducer, fixtures));
Version data entries
12 entries across 12 versions & 1 rubygems