mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-18 00:17:25 +00:00
Do not show flash message if we're performing an async update without reload
This commit is contained in:
@@ -784,7 +784,7 @@ describe 'OrderCycle services', ->
|
||||
it 'redirects to the destination page on success', ->
|
||||
OrderCycle.order_cycle = 'this is the order cycle'
|
||||
spyOn(OrderCycle, 'dataForSubmit').andReturn('this is the submit data')
|
||||
$httpBackend.expectPUT('/admin/order_cycles.json', {
|
||||
$httpBackend.expectPUT('/admin/order_cycles.json?reloading=1', {
|
||||
order_cycle: 'this is the submit data'
|
||||
}).respond {success: true}
|
||||
|
||||
@@ -795,7 +795,7 @@ describe 'OrderCycle services', ->
|
||||
it 'does not redirect on error', ->
|
||||
OrderCycle.order_cycle = 'this is the order cycle'
|
||||
spyOn(OrderCycle, 'dataForSubmit').andReturn('this is the submit data')
|
||||
$httpBackend.expectPUT('/admin/order_cycles.json', {
|
||||
$httpBackend.expectPUT('/admin/order_cycles.json?reloading=1', {
|
||||
order_cycle: 'this is the submit data'
|
||||
}).respond {success: false}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user