mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
41 lines
939 B
CoffeeScript
41 lines
939 B
CoffeeScript
describe 'All controllers', ->
|
|
describe 'ProductsCtrl', ->
|
|
ctrl = null
|
|
scope = null
|
|
event = null
|
|
rootScope = null
|
|
Product = null
|
|
|
|
beforeEach ->
|
|
module('Shop')
|
|
Product =
|
|
all: ->
|
|
update: ->
|
|
data: "testy mctest"
|
|
|
|
inject ($controller, $rootScope) ->
|
|
rootScope = $rootScope
|
|
scope = $rootScope.$new()
|
|
ctrl = $controller 'ProductsCtrl', {$scope: scope, Product : Product}
|
|
|
|
it 'Fetches products from Product', ->
|
|
expect(scope.data).toEqual 'testy mctest'
|
|
|
|
|
|
describe 'OrderCycleCtrl', ->
|
|
ctrl = null
|
|
scope = null
|
|
event = null
|
|
rootScope = null
|
|
product_ctrl = null
|
|
OrderCycle = null
|
|
|
|
beforeEach ->
|
|
module 'Shop'
|
|
scope = {}
|
|
inject ($controller, $rootScope) ->
|
|
rootScope = $rootScope
|
|
scope = $rootScope.$new()
|
|
ctrl = $controller 'OrderCycleCtrl', {$scope: scope}
|
|
|