Sha256: 8e4d697a333ed5c98f91652bbe488273f221c908e51fc842dbaffff7aeca481c

Contents?: true

Size: 1.04 KB

Versions: 186

Compression:

Stored size: 1.04 KB

Contents

import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import { subscriptionTypeFormatter } from '../SubscriptionTypeFormatter';

describe('subscriptionTypeFormatter', () => {
  const data = rowData => ({
    rowData,
  });

  it('renders physical subscriptions', async () => {
    const formatter = subscriptionTypeFormatter(null, data({ virt_only: false }));

    expect(toJson(shallow(formatter))).toMatchSnapshot();
  });

  it('renders temporary subscriptions', async () => {
    const formatter = subscriptionTypeFormatter(null, data({ unmapped_guest: true }));

    expect(toJson(shallow(formatter))).toMatchSnapshot();
  });

  it('renders virtual subscriptions', async () => {
    const formatter = subscriptionTypeFormatter(null, data({}));

    expect(toJson(shallow(formatter))).toMatchSnapshot();
  });

  it('renders link to a host', async () => {
    const formatter = subscriptionTypeFormatter(null, data({ hypervisor: { name: 'host.example.com', id: 83 } }));

    expect(toJson(shallow(formatter))).toMatchSnapshot();
  });
});

Version data entries

186 entries across 186 versions & 1 rubygems

Version Path
katello-4.7.5 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.8.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.8.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.7.4 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.8.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.7.3 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.7.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.7.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.6.2.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.6.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.7.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.6.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.7.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.7.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.4.2.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.4.2.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.4.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.5.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.6.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.6.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js