mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Add validation of open and close dates for order cycles
This commit is contained in:
committed by
Maikel Linke
parent
b14f27f956
commit
b17d8c2fe3
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user