25 lines
556 B
JavaScript
Raw Normal View History

2016-09-30 18:25:04 +02:00
import expect from 'expect';
import {
2016-10-05 11:32:31 +02:00
showNotification,
2016-09-30 18:25:04 +02:00
} from '../actions';
import {
2016-10-05 11:32:31 +02:00
SHOW_NOTIFICATION,
2016-09-30 18:25:04 +02:00
} from '../constants';
describe('NotificationProvider actions', () => {
describe('Default Action', () => {
2016-10-05 11:32:31 +02:00
it('has a type of SHOW_NOTIFICATION', () => {
const message = 'Well done!';
const status = 'success';
2016-09-30 18:25:04 +02:00
const expected = {
2016-10-05 11:32:31 +02:00
type: SHOW_NOTIFICATION,
message,
status,
id: 1,
2016-09-30 18:25:04 +02:00
};
2016-10-05 11:32:31 +02:00
expect(showNotification(expected.message, expected.status)).toEqual(expected);
2016-09-30 18:25:04 +02:00
});
});
});