Sha256: 79c5ba358dfba39ab9b0085338604df6493a97165c7efe98e39b697ddc1cf8b9
Contents?: true
Size: 798 Bytes
Versions: 66
Compression:
Stored size: 798 Bytes
Contents
import { testSelectorsSnapshotWithFixtures } from '@theforeman/test'; import { selectUnassignedRoles } from '../AnsibleRolesSwitcherSelectors'; import { ansibleRolesShort } from '../__fixtures__/ansibleRolesData.fixtures'; const stateFactory = obj => ({ foremanAnsible: { ansibleRolesSwitcher: obj, }, }); const state1 = { results: ansibleRolesShort, assignedRoles: [{ id: 2 }, { id: 4 }], }; const state2 = { results: ansibleRolesShort, assignedRoles: [], }; const fixtures = { 'should return unassigned roles': () => selectUnassignedRoles(stateFactory(state1)), 'should return all roles when no roles assigned': () => selectUnassignedRoles(stateFactory(state2)), }; describe('AnsibleRolesSwitcherSelectors', () => testSelectorsSnapshotWithFixtures(fixtures));
Version data entries
66 entries across 66 versions & 1 rubygems