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

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