'use strict';
jest.dontMock('../../reducers/rssListModal');
import rssListModal from '../../reducers/rssListModal';
import * as actionTypes from '../../utils/actionTypes';

const initialAppState = {
  rssListModalOpen: false
};

test('rssListModal', () => {
  var action = {
    type: actionTypes.RSSLISTMODAL
  };
  var rssListModalAction = rssListModal(initialAppState, action);
  expect(rssListModalAction).toEqual({rssListModalOpen: true, state: initialAppState});
})

test('rssInput', () => {
  var action = {
    type: actionTypes.RSSINPUT,
    name:'name',
    url:'url'
  };
  var rssListModalAction = rssListModal(initialAppState, action);
  expect(rssListModalAction).toEqual({rssListModalOpen: false, state: initialAppState});
})

test('else', () => {
  var action = {
    type: 'else'
  };
  var elseaction = rssListModal(initialAppState, action);
  expect(elseaction).toEqual(initialAppState);
});

@@ -164,16 +164,68 @@
 nTypes';
+%0Aimport * as constants from '../../utils/constants';
 %0A%0Aconst 
@@ -502,32 +502,45 @@
  initialAppState
+, urlList: %7B%7D
 %7D);%0A%7D)%0A%0Atest('rs
@@ -614,16 +614,17 @@
    name:
+ 
 'name',%0A
@@ -631,16 +631,17 @@
     url:
+ 
 'url'%0A  
@@ -701,32 +701,35 @@
 State, action);%0A
+  %0A
   expect(rssList
@@ -742,32 +742,37 @@
 ction).toEqual(%7B
+%0A    
 rssListModalOpen
@@ -779,16 +779,20 @@
 : false,
+%0A   
  state: 
@@ -806,16 +806,78 @@
 AppState
+,%0A    urlList: %7B%0A      name: 'name',%0A      url: 'url'%0A    %7D%0A  
 %7D);%0A%7D)%0A%0A

fix rssListModal test