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 "Enterprises service", ->
result = Enterprises.index()
$httpBackend.flush()
it "stores returned data in @enterprisesByID, with ids as keys", ->
it "stores returned data in @byID, with ids as keys", ->
# EnterpriseResource returns instances of Resource rather than raw objects
expect(Enterprises.enterprisesByID).toDeepEqual { 5: response[0] }
expect(Enterprises.byID).toDeepEqual { 5: response[0] }
it "stores returned data in @pristineByID, with ids as keys", ->
expect(Enterprises.pristineByID).toDeepEqual { 5: response[0] }