mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-18 00:17:25 +00:00
Simplify Navigation.go, not preserving hash fragments
I looked through the history and it looks like this function was a bit flawed (preserving hash fragments) from the beginning. It has been patched a few times without addressing the underlying issue that we want more than just replacing the pathname. We want to go somewhere else.
This commit is contained in:
@@ -3,7 +3,6 @@ describe 'Navigation service', ->
|
||||
window =
|
||||
location:
|
||||
href: null
|
||||
pathname: null
|
||||
|
||||
beforeEach ->
|
||||
module 'Darkswarm', ($provide) ->
|
||||
@@ -24,5 +23,4 @@ describe 'Navigation service', ->
|
||||
|
||||
it "redirects to paths", ->
|
||||
Navigation.go "/woo/yeah"
|
||||
expect(window.location.pathname).toEqual "/woo/yeah"
|
||||
|
||||
expect(window.location.href).toEqual "/woo/yeah"
|
||||
|
||||
Reference in New Issue
Block a user