Sha256: 5465e1c430bf8678b4cec7e66d5887108ac236cff3987969090b454e32dbd288

Contents?: true

Size: 994 Bytes

Versions: 6

Compression:

Stored size: 994 Bytes

Contents

import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import SubscriptionsPage from '../SubscriptionsPage';
import { successState } from './subscriptions.fixtures';
import { loadSubscriptions, updateQuantity } from '../SubscriptionActions';
import { loadSetting } from '../../../move_to_foreman/Settings/SettingsActions';

jest.mock('../../../move_to_foreman/foreman_toast_notifications');

describe('subscriptions page', () => {
  const noop = () => {};
  const organization = { owner_details: { upstreamConsumer: 'blah' } };

  it('should render', async () => {
    const page = shallow(<SubscriptionsPage
      organization={organization}
      subscriptions={successState}
      loadSetting={loadSetting}
      loadSubscriptions={loadSubscriptions}
      updateQuantity={updateQuantity}
      pollTaskUntilDone={noop}
      pollBulkSearch={noop}
      deleteSubscriptions={() => {}}
    />);
    expect(toJson(page)).toMatchSnapshot();
  });
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
katello-3.8.1 webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js
katello-3.7.1.1 webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js
katello-3.7.1 webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js
katello-3.8.0 webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js
katello-3.8.0.rc3 webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js
katello-3.8.0.rc2 webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js