Adding product property filter to shop page

This commit is contained in:
Rob Harrington
2015-03-06 11:22:52 +11:00
parent 55b8918ea1
commit 06f10398da
12 changed files with 105 additions and 50 deletions

View File

@@ -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']