mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-22 00:57:26 +00:00
Adding product property filter to shop page
This commit is contained in:
@@ -4,19 +4,23 @@ describe 'ProductsCtrl', ->
|
||||
event = null
|
||||
Products = null
|
||||
Cart = {}
|
||||
Taxons = null
|
||||
|
||||
beforeEach ->
|
||||
module('Darkswarm')
|
||||
Products =
|
||||
Products =
|
||||
all: ->
|
||||
update: ->
|
||||
products: ["testy mctest"]
|
||||
loading: false
|
||||
OrderCycle =
|
||||
order_cycle: {}
|
||||
|
||||
inject ($controller) ->
|
||||
scope = {}
|
||||
ctrl = $controller 'ProductsCtrl', {$scope: scope, Products: Products, OrderCycle: OrderCycle, Cart: Cart}
|
||||
Taxons:
|
||||
taxons: []
|
||||
|
||||
inject ($rootScope, $controller) ->
|
||||
scope = $rootScope
|
||||
ctrl = $controller 'ProductsCtrl', {$scope: scope, Products: Products, OrderCycle: OrderCycle, Cart: Cart, Taxons: Taxons}
|
||||
|
||||
it 'fetches products from Products', ->
|
||||
expect(scope.Products.products).toEqual ['testy mctest']
|
||||
|
||||
Reference in New Issue
Block a user