mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Improving the navigation by moving it all to a service, adding a generic icon
This commit is contained in:
16
spec/javascripts/unit/darkswarm/navigation.js.coffee
Normal file
16
spec/javascripts/unit/darkswarm/navigation.js.coffee
Normal file
@@ -0,0 +1,16 @@
|
||||
describe 'Navigation service', ->
|
||||
Navigation = null
|
||||
|
||||
beforeEach ->
|
||||
module 'Darkswarm'
|
||||
inject ($injector)->
|
||||
Navigation = $injector.get("Navigation")
|
||||
|
||||
it "caches the path provided", ->
|
||||
Navigation.navigate "/foo"
|
||||
expect(Navigation.path).toEqual "/foo"
|
||||
|
||||
it "defaults to the first path in the list", ->
|
||||
Navigation.paths = ["/test", "/bar"]
|
||||
Navigation.navigate()
|
||||
expect(Navigation.path).toEqual "/test"
|
||||
Reference in New Issue
Block a user