Choices/src/scripts/actions/groups.test.ts

26 lines
567 B
TypeScript
Raw Normal View History

2017-10-10 16:26:38 +02:00
import { expect } from 'chai';
import * as actions from './groups';
2017-10-29 19:56:24 +01:00
describe('actions/groups', () => {
2017-10-10 16:26:38 +02:00
describe('addGroup action', () => {
it('returns ADD_GROUP action', () => {
const value = 'test';
const id = 1;
2017-10-10 16:26:38 +02:00
const active = true;
const disabled = false;
const expectedAction: actions.AddGroupAction = {
2017-10-10 16:26:38 +02:00
type: 'ADD_GROUP',
value,
id,
active,
disabled,
};
expect(actions.addGroup({ value, id, active, disabled })).to.eql(
expectedAction,
);
2017-10-10 16:26:38 +02:00
});
});
});