Add validation of open and close dates for order cycles

This commit is contained in:
Rob Harrington
2018-03-01 16:59:10 +11:00
committed by Maikel Linke
parent b14f27f956
commit b17d8c2fe3
8 changed files with 101 additions and 43 deletions

View File

@@ -812,7 +812,7 @@ describe 'OrderCycle services', ->
spyOn(OrderCycle, 'dataForSubmit').and.returnValue('this is the submit data')
$httpBackend.expectPOST('/admin/order_cycles.json', {
order_cycle: 'this is the submit data'
}).respond {success: false}
}).respond 400, { errors: [] }
OrderCycle.create('/destination/page')
$httpBackend.flush()
@@ -840,7 +840,7 @@ describe 'OrderCycle services', ->
spyOn(OrderCycle, 'dataForSubmit').and.returnValue('this is the submit data')
$httpBackend.expectPUT('/admin/order_cycles.json?reloading=1', {
order_cycle: 'this is the submit data'
}).respond {success: false}
}).respond 400, { errors: [] }
OrderCycle.update('/destination/page')
$httpBackend.flush()