mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-20 00:37:26 +00:00
Merge remote-tracking branch 'origin/master' into HEAD
This commit is contained in:
@@ -21,7 +21,7 @@ describe "CustomersCtrl", ->
|
||||
expect(scope.CurrentShop.shop).toEqual {}
|
||||
|
||||
describe "setting the shop on scope", ->
|
||||
customer = { id: 5, email: 'someone@email.com'}
|
||||
customer = { id: 5, email: 'someone@email.com', code: 'a'}
|
||||
customers = [customer]
|
||||
|
||||
beforeEach ->
|
||||
@@ -33,6 +33,12 @@ describe "CustomersCtrl", ->
|
||||
it "retrievs the list of customers", ->
|
||||
expect(scope.customers).toDeepEqual customers
|
||||
|
||||
it "finds customers by code", ->
|
||||
as = scope.findByCode('a')
|
||||
expect(as).toDeepEqual customers
|
||||
as = scope.findByCode('b')
|
||||
expect(as).toDeepEqual []
|
||||
|
||||
describe "scope.add", ->
|
||||
it "creates a new customer", ->
|
||||
email = "customer@example.org"
|
||||
|
||||
Reference in New Issue
Block a user