Sha256: ba63528f6ec0e9f3b66f11159f859f5e7ea0c23eebf31f2b6b8ab36bd376c7f9

Contents?: true

Size: 641 Bytes

Versions: 10

Compression:

Stored size: 641 Bytes

Contents

import React from 'react';
import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
import withProtectedView from '../withProtectedView';

const ProtectedComponent = () => <div>Protected component</div>;

const ProtectionComponent = () => <div>Protection component</div>;

const fixtures = {
  'should return protected component': () =>
    withProtectedView(ProtectedComponent, ProtectionComponent, () => true)(),
  'should return protection component': () =>
    withProtectedView(ProtectedComponent, ProtectionComponent, () => false)(),
};

describe('withProtectedView', () =>
  testSelectorsSnapshotWithFixtures(fixtures));

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_templates-10.0.2 webpack/__tests__/helpers.test.js
foreman_templates-10.0.1 webpack/__tests__/helpers.test.js
foreman_templates-10.0.0 webpack/__tests__/helpers.test.js
foreman_templates-9.5.1 webpack/__tests__/helpers.test.js
foreman_templates-9.5.0 webpack/__tests__/helpers.test.js
foreman_templates-9.3.3 webpack/__tests__/helpers.test.js
foreman_templates-9.3.2 webpack/__tests__/helpers.test.js
foreman_templates-9.3.1 webpack/__tests__/helpers.test.js
foreman_templates-9.4.0 webpack/__tests__/helpers.test.js
foreman_templates-9.3.0 webpack/__tests__/helpers.test.js