mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-18 04:39:14 +00:00
Remove obsolete goWithoutHashFragments
It was introduced, because `Navigation.go` perserved hash fragments. We actually don't need that behaviour and it has been corrected. `goWithoutHashFragments` also didn't deal with absolute URLs. And it used `location.origin` which is not supported by Internet Explorer. That is fixed by our use of Modernizr though.
This commit is contained in:
@@ -95,6 +95,12 @@ describe 'Checkout service', ->
|
||||
Checkout.submit()
|
||||
$httpBackend.flush()
|
||||
|
||||
it "Redirects to the returned path", ->
|
||||
$httpBackend.expectPUT("/checkout.json", {order: Checkout.preprocess()}).respond 200, {path: "/test"}
|
||||
Checkout.submit()
|
||||
$httpBackend.flush()
|
||||
expect(Navigation.go).toHaveBeenCalledWith '/test'
|
||||
|
||||
describe "when there is an error", ->
|
||||
it "redirects when a redirect is given", ->
|
||||
$httpBackend.expectPUT("/checkout.json").respond 400, {path: 'path'}
|
||||
|
||||
Reference in New Issue
Block a user