aboutsummaryrefslogtreecommitdiff
path: root/test/actions/follow.test.js
blob: 32ab9e2f31e20820448e64754a4df9b0f9e1f623 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { expect } from "chai";
import actions from 'actions';
import * as followActions from 'actions/follow';

describe('follow actions', () => {
  describe('enable', () => {
    it('creates FOLLOW_ENABLE action', () => {
      let action = followActions.enable(true);
      expect(action.type).to.equal(actions.FOLLOW_ENABLE);
      expect(action.newTab).to.equal(true);
    });
  });

  describe('disable', () => {
    it('creates FOLLOW_DISABLE action', () => {
      let action = followActions.disable(true);
      expect(action.type).to.equal(actions.FOLLOW_DISABLE);
    });
  });

  describe('keyPress', () => {
    it('creates FOLLOW_KEY_PRESS action', () => {
      let action = followActions.keyPress(100);
      expect(action.type).to.equal(actions.FOLLOW_KEY_PRESS);
      expect(action.key).to.equal(100);
    });
  });

  describe('backspace', () => {
    it('creates FOLLOW_BACKSPACE action', () => {
      let action = followActions.backspace(100);
      expect(action.type).to.equal(actions.FOLLOW_BACKSPACE);
    });
  });
});