Sha256: 0fc2975855bf76f63904980e0b00f5c7b416fcc1b65d5ae39df33487e26e5859
Contents?: true
Size: 909 Bytes
Versions: 164
Compression:
Stored size: 909 Bytes
Contents
import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils'; import { ORGANIZATION_PRODUCTS_REQUEST, ORGANIZATION_PRODUCTS_SUCCESS, ORGANIZATION_PRODUCTS_FAILURE, } from '../OrganizationProductsConstants'; import reducer from '../OrganizationProductsReducer'; const fixtures = { 'should return the initial state': {}, 'should handle ORGANIZATION_PRODUCTS_REQUEST': { action: { type: ORGANIZATION_PRODUCTS_REQUEST, }, }, 'should handle ORGANIZATION_PRODUCTS_SUCCESS': { action: { type: ORGANIZATION_PRODUCTS_SUCCESS, payload: { results: ['some', 'results'], }, }, }, 'should handle ORGANIZATION_PRODUCTS_FAILURE': { action: { type: ORGANIZATION_PRODUCTS_FAILURE, payload: new Error('some error'), }, }, }; describe('OrganizationProducts reducer', () => testReducerSnapshotWithFixtures(reducer, fixtures));
Version data entries
164 entries across 164 versions & 1 rubygems