Sha256: 80c7f2baae6f29ac3f704c975ea03aff06ea885eb446a0ac2a38f4a200e49748

Contents?: true

Size: 1.04 KB

Versions: 166

Compression:

Stored size: 1.04 KB

Contents

import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
import * as types from '../TableConstants';

import {
  requestSuccessResponse,
  tableRecord,
} from './Table.fixtures';
import reducer from '../TableReducer';

const fixtures = {
  'should return the initial state': {},
  'should keep loading state on TABLES_REQUEST': {
    action: {
      type: types.TABLES_REQUEST,
    },
  },
  'should pull table list from response TABLES_SUCCESS': {
    action: {
      type: types.TABLES_SUCCESS,
      payload: (requestSuccessResponse),
    },
  },
  'should have error on TABLE_REQUEST_FAILURE': {
    action: {
      type: types.TABLES_FAILURE,
    },
  },
  'should create response for CREATE_TABLE_SUCCESS': {
    action: {
      type: types.CREATE_TABLE_SUCCESS,
      payload: [tableRecord],
    },
  },
  'should update response UPDATE_TABLE_SUCCESS': {
    action: {
      type: types.UPDATE_TABLE_SUCCESS,
      payload: [tableRecord],
    },
  },
};
describe('Tables reducer', () => testReducerSnapshotWithFixtures(reducer, fixtures));

Version data entries

166 entries across 166 versions & 1 rubygems

Version Path
katello-4.2.0.rc2 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.3 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.2.0.rc1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.0.2.1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.2.1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.0.2 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.2 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-3.18.4 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.0 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.0.1.2 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-3.18.3.1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.0.rc2.2 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.0.rc2.1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.0.1.1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-3.18.3 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.0.rc2 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.0.1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.0.rc1.1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js
katello-4.1.0.rc1 webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js