Do not show flash message if we're performing an async update without reload

This commit is contained in:
Rohan Mitchell
2015-11-17 11:42:16 +11:00
parent 9fef0a9909
commit a2c0088c91
4 changed files with 21 additions and 5 deletions

View File

@@ -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}