it('Should set `state.epicTodoToggleInProgress` flag to `false`',done=>{
it('Should set `state.epicTodoToggleInProgress` flag to `false`',(done)=>{
testAction(
testAction(
actions.requestEpicTodoToggleFailure,
actions.requestEpicTodoToggleFailure,
{},
{},
...
@@ -450,7 +450,7 @@ describe('Epic Store Actions', () => {
...
@@ -450,7 +450,7 @@ describe('Epic Store Actions', () => {
});
});
describe('when `state.togoExists` is false',()=>{
describe('when `state.togoExists` is false',()=>{
it('dispatches requestEpicTodoToggle, triggerTodoToggleEvent and requestEpicTodoToggleSuccess when request is successful',done=>{
it('dispatches requestEpicTodoToggle, triggerTodoToggleEvent and requestEpicTodoToggleSuccess when request is successful',(done)=>{
mock.onPost(/(.*)/).replyOnce(200,{
mock.onPost(/(.*)/).replyOnce(200,{
count:5,
count:5,
delete_path:'/foo/bar',
delete_path:'/foo/bar',
...
@@ -478,7 +478,7 @@ describe('Epic Store Actions', () => {
...
@@ -478,7 +478,7 @@ describe('Epic Store Actions', () => {
);
);
});
});
it('dispatches requestEpicTodoToggle and requestEpicTodoToggleFailure when request fails',done=>{
it('dispatches requestEpicTodoToggle and requestEpicTodoToggleFailure when request fails',(done)=>{
mock.onPost(/(.*)/).replyOnce(500,{});
mock.onPost(/(.*)/).replyOnce(500,{});
testAction(
testAction(
...
@@ -500,7 +500,7 @@ describe('Epic Store Actions', () => {
...
@@ -500,7 +500,7 @@ describe('Epic Store Actions', () => {
});
});
describe('when `state.togoExists` is true',()=>{
describe('when `state.togoExists` is true',()=>{
it('dispatches requestEpicTodoToggle, triggerTodoToggleEvent and requestEpicTodoToggleSuccess when request is successful',done=>{
it('dispatches requestEpicTodoToggle, triggerTodoToggleEvent and requestEpicTodoToggleSuccess when request is successful',(done)=>{
mock.onDelete(/(.*)/).replyOnce(200,{
mock.onDelete(/(.*)/).replyOnce(200,{
count:5,
count:5,
});
});
...
@@ -527,7 +527,7 @@ describe('Epic Store Actions', () => {
...
@@ -527,7 +527,7 @@ describe('Epic Store Actions', () => {
);
);
});
});
it('dispatches requestEpicTodoToggle and requestEpicTodoToggleFailure when request fails',done=>{
it('dispatches requestEpicTodoToggle and requestEpicTodoToggleFailure when request fails',(done)=>{
mock.onDelete(/(.*)/).replyOnce(500,{});
mock.onDelete(/(.*)/).replyOnce(500,{});
testAction(
testAction(
...
@@ -550,7 +550,7 @@ describe('Epic Store Actions', () => {
...
@@ -550,7 +550,7 @@ describe('Epic Store Actions', () => {
});
});
describe('toggleStartDateType',()=>{
describe('toggleStartDateType',()=>{
it('should set `state.startDateIsFixed` flag to `true`',done=>{
it('should set `state.startDateIsFixed` flag to `true`',(done)=>{
constdateTypeIsFixed=true;
constdateTypeIsFixed=true;
testAction(
testAction(
...
@@ -565,7 +565,7 @@ describe('Epic Store Actions', () => {
...
@@ -565,7 +565,7 @@ describe('Epic Store Actions', () => {
});
});
describe('toggleDueDateType',()=>{
describe('toggleDueDateType',()=>{
it('should set `state.dueDateIsFixed` flag to `true`',done=>{
it('should set `state.dueDateIsFixed` flag to `true`',(done)=>{
constdateTypeIsFixed=true;
constdateTypeIsFixed=true;
testAction(
testAction(
...
@@ -580,7 +580,7 @@ describe('Epic Store Actions', () => {
...
@@ -580,7 +580,7 @@ describe('Epic Store Actions', () => {
});
});
describe('requestEpicDateSave',()=>{
describe('requestEpicDateSave',()=>{
it('should set `state.epicStartDateSaveInProgress` flag to `true` when called with `dateType` as `start`',done=>{
it('should set `state.epicStartDateSaveInProgress` flag to `true` when called with `dateType` as `start`',(done)=>{
constdateType=dateTypes.start;
constdateType=dateTypes.start;
testAction(
testAction(
...
@@ -593,7 +593,7 @@ describe('Epic Store Actions', () => {
...
@@ -593,7 +593,7 @@ describe('Epic Store Actions', () => {
);
);
});
});
it('should set `state.epicDueDateSaveInProgress` flag to `true` when called with `dateType` as `due`',done=>{
it('should set `state.epicDueDateSaveInProgress` flag to `true` when called with `dateType` as `due`',(done)=>{
constdateType=dateTypes.due;
constdateType=dateTypes.due;
testAction(
testAction(
...
@@ -608,7 +608,7 @@ describe('Epic Store Actions', () => {
...
@@ -608,7 +608,7 @@ describe('Epic Store Actions', () => {
});
});
describe('requestEpicDateSaveSuccess',()=>{
describe('requestEpicDateSaveSuccess',()=>{
it('should set `state.epicStartDateSaveInProgress` flag to `false` and set values of `startDateIsFixed` & `startDate` with params `dateTypeIsFixed` & `newDate` when called with `dateType` as `start`',done=>{
it('should set `state.epicStartDateSaveInProgress` flag to `false` and set values of `startDateIsFixed` & `startDate` with params `dateTypeIsFixed` & `newDate` when called with `dateType` as `start`',(done)=>{
constdata={
constdata={
dateType:dateTypes.start,
dateType:dateTypes.start,
dateTypeIsFixed:true,
dateTypeIsFixed:true,
...
@@ -625,7 +625,7 @@ describe('Epic Store Actions', () => {
...
@@ -625,7 +625,7 @@ describe('Epic Store Actions', () => {
);
);
});
});
it('should set `state.epicDueDateSaveInProgress` flag to `false` and set values of `dueDateIsFixed` & `dueDate` with params `dateTypeIsFixed` & `newDate` when called with `dateType` as `due`',done=>{
it('should set `state.epicDueDateSaveInProgress` flag to `false` and set values of `dueDateIsFixed` & `dueDate` with params `dateTypeIsFixed` & `newDate` when called with `dateType` as `due`',(done)=>{
constdata={
constdata={
dateType:dateTypes.due,
dateType:dateTypes.due,
dateTypeIsFixed:true,
dateTypeIsFixed:true,
...
@@ -648,7 +648,7 @@ describe('Epic Store Actions', () => {
...
@@ -648,7 +648,7 @@ describe('Epic Store Actions', () => {
it('should set `state.epicStartDateSaveInProgress` flag to `false` and set value of `startDateIsFixed` to that of param `dateTypeIsFixed` when called with `dateType` as `start`',done=>{
it('should set `state.epicStartDateSaveInProgress` flag to `false` and set value of `startDateIsFixed` to that of param `dateTypeIsFixed` when called with `dateType` as `start`',(done)=>{
constdata={
constdata={
dateType:dateTypes.start,
dateType:dateTypes.start,
dateTypeIsFixed:true,
dateTypeIsFixed:true,
...
@@ -669,7 +669,7 @@ describe('Epic Store Actions', () => {
...
@@ -669,7 +669,7 @@ describe('Epic Store Actions', () => {
);
);
});
});
it('should set `state.epicDueDateSaveInProgress` flag to `false` and set value of `dueDateIsFixed` to that of param `dateTypeIsFixed` when called with `dateType` as `due`',done=>{
it('should set `state.epicDueDateSaveInProgress` flag to `false` and set value of `dueDateIsFixed` to that of param `dateTypeIsFixed` when called with `dateType` as `due`',(done)=>{
constdata={
constdata={
dateType:dateTypes.due,
dateType:dateTypes.due,
dateTypeIsFixed:true,
dateTypeIsFixed:true,
...
@@ -741,7 +741,7 @@ describe('Epic Store Actions', () => {
...
@@ -741,7 +741,7 @@ describe('Epic Store Actions', () => {
mock.restore();
mock.restore();
});
});
it('dispatches requestEpicDateSave and requestEpicDateSaveSuccess when request is successful',done=>{
it('dispatches requestEpicDateSave and requestEpicDateSaveSuccess when request is successful',(done)=>{