Sha256: bd45f08d224e62374eda41fddaf96f53e5273b120358638751ca4500ef34f738

Contents?: true

Size: 853 Bytes

Versions: 4

Compression:

Stored size: 853 Bytes

Contents

import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
import reducer from '../InsightsTabReducer';
import { hits } from './InsightsTab.fixtures';
import {
  INSIGHTS_HITS_REQUEST,
  INSIGHTS_HITS_SUCCESS,
  INSIGHTS_HITS_FAILURE,
} from '../InsightsTabConstants';

const fixtures = {
  'should return the initial state': {},
  'should handle INSIGHTS_HITS_REQUEST': {
    action: {
      type: INSIGHTS_HITS_REQUEST,
      payload: {},
    },
  },
  'should handle INSIGHTS_HITS_SUCCESS': {
    action: {
      type: INSIGHTS_HITS_SUCCESS,
      payload: { hits },
    },
  },
  'should handle INSIGHTS_HITS_FAILURE': {
    action: {
      type: INSIGHTS_HITS_FAILURE,
      payload: {
        error: 'some-error',
      },
    },
  },
};

describe('AccountList reducer', () =>
  testReducerSnapshotWithFixtures(reducer, fixtures));

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_rh_cloud-0.9.12 webpack/InsightsHostDetailsTab/__tests__/InsightsTabReducer.test.js
foreman_rh_cloud-1.0.12 webpack/InsightsHostDetailsTab/__tests__/InsightsTabReducer.test.js
foreman_rh_cloud-0.9.11 webpack/InsightsHostDetailsTab/__tests__/InsightsTabReducer.test.js
foreman_rh_cloud-1.0.11 webpack/InsightsHostDetailsTab/__tests__/InsightsTabReducer.test.js