mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Getting the tests working once more
This commit is contained in:
@@ -6,8 +6,8 @@ describe "SidebarCtrl", ->
|
||||
beforeEach ->
|
||||
module("Darkswarm")
|
||||
location =
|
||||
hash: ->
|
||||
"sidebar"
|
||||
path: ->
|
||||
"/login"
|
||||
inject ($controller, $rootScope) ->
|
||||
scope = $rootScope
|
||||
ctrl = $controller 'SidebarCtrl', {$scope: scope, $location: location}
|
||||
@@ -17,6 +17,6 @@ describe "SidebarCtrl", ->
|
||||
expect(scope.active()).toEqual true
|
||||
|
||||
it 'is inactive no location is set', ->
|
||||
location.hash = ->
|
||||
location.path = ->
|
||||
null
|
||||
expect(scope.active()).toEqual false
|
||||
|
||||
@@ -32,3 +32,13 @@ describe 'OrderCycle service', ->
|
||||
$httpBackend.flush()
|
||||
expect(OrderCycle.order_cycle.orders_close_at).toEqual(datestring)
|
||||
|
||||
it "tells us when the order cycle closes", ->
|
||||
OrderCycle.order_cycle.orders_close_at = "test"
|
||||
expect(OrderCycle.orders_close_at()).toEqual "test"
|
||||
|
||||
it "tells us when no order cycle is selected", ->
|
||||
OrderCycle.order_cycle = null
|
||||
expect(OrderCycle.selected()).toEqual false
|
||||
OrderCycle.order_cycle = {test: "blah"}
|
||||
expect(OrderCycle.selected()).toEqual true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user