Changing convention for angular resource services to generic 'byID' object and 'all' array

This commit is contained in:
Rob Harrington
2016-08-20 19:57:31 +10:00
parent cbbb047fc1
commit 3de69987e6
11 changed files with 49 additions and 39 deletions

View File

@@ -23,9 +23,9 @@ describe "Orders service", ->
result = Orders.index()
$httpBackend.flush()
it "stores returned data in @ordersByID, with ids as keys", ->
it "stores returned data in @byID, with ids as keys", ->
# OrderResource returns instances of Resource rather than raw objects
expect(Orders.ordersByID).toDeepEqual { 5: response[0] }
expect(Orders.byID).toDeepEqual { 5: response[0] }
it "stores returned data in @pristineByID, with ids as keys", ->
expect(Orders.pristineByID).toDeepEqual { 5: response[0] }