Sha256: a1ab083545444edd9000140b94507a2c1a6dfa8790c6d6bd4fbf650f6da52aa9
Contents?: true
Size: 1.31 KB
Versions: 6
Compression:
Stored size: 1.31 KB
Contents
import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils'; import { INSIGHTS_SYNC_SETTING_SET, INSIGHTS_SYNC_SETTING_SET_FAILURE, INSIGHTS_SYNC_SETTINGS_GET_SUCCESS, INSIGHTS_SYNC_SETTINGS_GET_FAILURE, } from '../InsightsSettingsConstants'; import reducer from '../InsightsSettingsReducer'; const fixtures = { 'should return the initial state': {}, 'should handle INSIGHTS_SYNC_SETTINGS_GET_SUCCESS': { action: { type: INSIGHTS_SYNC_SETTINGS_GET_SUCCESS, payload: { settings: { insightsSyncEnabled: true, }, }, }, }, 'should handle INSIGHTS_SYNC_SETTINGS_GET_FAILURE': { action: { type: INSIGHTS_SYNC_SETTINGS_GET_FAILURE, payload: { settings: { error: 'test error', }, }, }, }, 'should handle INSIGHTS_SYNC_SETTING_SET': { action: { type: INSIGHTS_SYNC_SETTING_SET, payload: { settings: { insightsSyncEnabled: true, }, }, }, }, 'should handle INSIGHTS_SYNC_SETTING_SET_FAILURE': { action: { type: INSIGHTS_SYNC_SETTING_SET_FAILURE, payload: { settings: { error: 'test set error', }, }, }, }, }; describe('InsightsSettings reducer', () => testReducerSnapshotWithFixtures(reducer, fixtures));
Version data entries
6 entries across 6 versions & 1 rubygems