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:
Maikel Linke
2018-06-15 10:49:53 +10:00
parent fb02bdd25a
commit d510df5236
3 changed files with 7 additions and 5 deletions

View File

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