Improving the navigation by moving it all to a service, adding a generic icon

This commit is contained in:
Will Marshall
2014-03-28 12:15:08 +11:00
parent 12b1a1b0e9
commit e1465352d0
16 changed files with 91 additions and 27 deletions

View 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"