Example #1
0
  it('should handle SET_LINODE_GROUP', () => {
    const state = { group: '' };
    deepFreeze(state);

    expect(detail(state, actions.setLinodeGroup('asdf')))
      .to.have.property('group').that.equals('asdf');
  });
Example #2
0
 it('should return a SET_LINODE_GROUP action', () => {
   expect(actions.setLinodeGroup('asdf'))
     .to.deep.equal({
       type: actions.SET_LINODE_GROUP,
       group: 'asdf',
     });
 });
 it('copies the current group/label to the state', () => {
   const page = shallow(
     <LinodeDetailPage
       dispatch={dispatch}
       linodes={linodes}
       params={{ linodeId: 'linode_1234' }}
       detail={detail}
     />);
   const icon = page.find('.edit-icon');
   icon.simulate('click', { preventDefault: () => {} });
   expect(dispatch.calledWith(actions.setLinodeLabel(testLinode.label)))
     .to.equal(true);
   expect(dispatch.calledWith(actions.setLinodeGroup(testLinode.group)))
     .to.equal(true);
 });