mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
31 lines
688 B
CoffeeScript
31 lines
688 B
CoffeeScript
describe 'Shop controllers', ->
|
|
describe 'ProductsCtrl', ->
|
|
ctrl = null
|
|
scope = null
|
|
event = null
|
|
Product = null
|
|
|
|
beforeEach ->
|
|
module('Shop')
|
|
scope = {}
|
|
Product =
|
|
all: ->
|
|
'testy mctest'
|
|
inject ($controller) ->
|
|
ctrl = $controller 'ProductsCtrl', {$scope: scope, Product : Product}
|
|
|
|
it 'Fetches products from Product', ->
|
|
expect(scope.products).toEqual 'testy mctest'
|
|
|
|
describe 'OrderCycleCtrl', ->
|
|
ctrl = null
|
|
scope = null
|
|
event = null
|
|
OrderCycle = null
|
|
|
|
beforeEach ->
|
|
module 'Shop'
|
|
scope = {}
|
|
inject ($controller) ->
|
|
ctrl = $controller 'OrderCycleCtrl'
|