ember-data-factory-guy 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,7 +54,7 @@ asyncTest("creates records in the store", function() {
54
54
  var user = store.makeFixture('user');
55
55
 
56
56
  store.find('user', user.id).then ( function(store_user) {
57
- deepEqual(store_user.toJSON(), user.toJSON());
57
+ equal(store_user, user);
58
58
  start()
59
59
  });
60
60
  });
@@ -69,7 +69,8 @@ test("handles camelCase attributes", function() {
69
69
  test("when hasMany associations assigned, belongTo parent is assigned", function() {
70
70
  var project = store.makeFixture('project');
71
71
  var user = store.makeFixture('user', {projects: [project]})
72
- deepEqual(project.get('user').toJSON(), user.toJSON());
72
+
73
+ equal(project.get('user'), user);
73
74
  });
74
75
 
75
76
 
@@ -78,7 +79,7 @@ asyncTest("when asnyc hasMany associations assigned, belongTo parent is assigned
78
79
  var company = store.makeFixture('company', {users: [user]});
79
80
 
80
81
  user.get('company').then(function(c){
81
- deepEqual(c.toJSON(), company.toJSON())
82
+ equal(c, company);
82
83
  start();
83
84
  })
84
85
  });
@@ -89,9 +90,9 @@ test("when polymorphic hasMany associations are assigned, belongTo parent is ass
89
90
  var sh = store.makeFixture('small_hat');
90
91
  var user = store.makeFixture('user', {hats: [bh, sh]})
91
92
 
92
- equal(user.get('hats.length'), 2);
93
- ok(user.get('hats.firstObject') instanceof BigHat)
94
- ok(user.get('hats.lastObject') instanceof SmallHat)
93
+ equal(user.get('hats.members.list.length'), 2);
94
+ ok(user.get('hats.manyArray.firstObject') instanceof BigHat)
95
+ ok(user.get('hats.manyArray.lastObject') instanceof SmallHat)
95
96
  // sets the belongTo user association
96
97
  ok(bh.get('user') == user)
97
98
  ok(sh.get('user') == user)
@@ -101,14 +102,16 @@ test("when polymorphic hasMany associations are assigned, belongTo parent is ass
101
102
  test("when hasMany associations are assigned, belongsTo parent is assigned using inverse", function() {
102
103
  var project = store.makeFixture('project');
103
104
  var project2 = store.makeFixture('project', {children: [project]});
104
- deepEqual(project.get('parent').toJSON(), project2.toJSON());
105
+
106
+ equal(project.get('parent'), project2);
105
107
  });
106
108
 
107
109
 
108
110
  test("when hasMany associations are assigned, belongsTo parent is assigned using actual belongsTo name", function() {
109
111
  var silk = store.makeFixture('silk');
110
112
  var bh = store.makeFixture('big_hat', {materials: [silk]});
111
- ok(silk.get('hat') == bh)
113
+
114
+ equal(silk.get('hat'), bh)
112
115
  });
113
116
 
114
117
 
@@ -117,9 +120,9 @@ test("when belongTo parent is assigned, parent adds to hasMany records", functio
117
120
  var project1 = store.makeFixture('project', {user: user});
118
121
  var project2 = store.makeFixture('project', {user: user});
119
122
 
120
- equal(user.get('projects.length'), 2);
121
- deepEqual(user.get('projects.firstObject').toJSON(), project1.toJSON());
122
- deepEqual(user.get('projects.lastObject').toJSON(), project2.toJSON());
123
+ equal(user.get('projects.members.list.length'), 2);
124
+ equal(user.get('projects.manyArray.firstObject'), project1);
125
+ equal(user.get('projects.manyArray.lastObject'), project2);
123
126
  });
124
127
 
125
128
 
@@ -128,9 +131,9 @@ test("when belongTo parent is assigned, parent adds to polymorphic hasMany recor
128
131
  store.makeFixture('big_hat', {user: user});
129
132
  store.makeFixture('small_hat', {user: user});
130
133
 
131
- equal(user.get('hats.length'), 2);
132
- ok(user.get('hats.firstObject') instanceof BigHat)
133
- ok(user.get('hats.lastObject') instanceof SmallHat)
134
+ equal(user.get('hats.members.list.length'), 2);
135
+ ok(user.get('hats.manyArray.firstObject') instanceof BigHat)
136
+ ok(user.get('hats.manyArray.lastObject') instanceof SmallHat)
134
137
  });
135
138
 
136
139
 
@@ -139,9 +142,9 @@ asyncTest("when async hasMany relationship is assigned, model relationship is sy
139
142
  var user1 = store.makeFixture('user', {properties: [property]});
140
143
  var user2 = store.makeFixture('user', {properties: [property]});
141
144
 
142
- equal(property.get('owners.length'), 2);
143
- deepEqual(property.get('owners.firstObject').toJSON(), user1.toJSON());
144
- deepEqual(property.get('owners.lastObject').toJSON(), user2.toJSON());
145
+ equal(property.get('owners.members.list.length'), 2);
146
+ equal(property.get('owners.manyArray.firstObject'), user1);
147
+ equal(property.get('owners.manyArray.lastObject'), user2);
145
148
  start();
146
149
  });
147
150
 
@@ -151,9 +154,9 @@ asyncTest("when async belongsTo parent is assigned, parent adds to hasMany recor
151
154
  var user1 = store.makeFixture('user', {company: company});
152
155
  var user2 = store.makeFixture('user', {company: company});
153
156
 
154
- equal(company.get('users.length'), 2);
155
- deepEqual(company.get('users.firstObject').toJSON(), user1.toJSON());
156
- deepEqual(company.get('users.lastObject').toJSON(), user2.toJSON());
157
+ equal(company.get('users.members.list.length'), 2);
158
+ equal(company.get('users.manyArray.firstObject'), user1);
159
+ equal(company.get('users.manyArray.lastObject'), user2);
157
160
  start();
158
161
  });
159
162
 
@@ -161,42 +164,44 @@ asyncTest("when async belongsTo parent is assigned, parent adds to hasMany recor
161
164
  test("when belongTo parent is assigned, parent adds to hasMany record using inverse", function() {
162
165
  var project = store.makeFixture('project');
163
166
  var project2 = store.makeFixture('project', {parent: project});
164
- equal(project.get('children.length'), 1);
165
- deepEqual(project.get('children.firstObject').toJSON(), project2.toJSON());
167
+
168
+ equal(project.get('children.members.list.length'), 1);
169
+ equal(project.get('children.manyArray.firstObject'), project2);
166
170
  });
167
171
 
168
172
 
169
173
  test("when belongTo parent is assigned, parent adds to hasMany record using actual hasMany name", function() {
170
174
  var bh = store.makeFixture('big_hat');
171
175
  var silk = store.makeFixture('silk', {hat: bh});
172
- ok(bh.get('materials.firstObject') == silk)
176
+
177
+ equal(bh.get('materials.manyArray.firstObject'), silk)
173
178
  });
174
179
 
175
180
 
176
181
  test("when belongTo parent is assigned, parent adds to belongsTo record", function() {
177
182
  var company = store.makeFixture('company');
178
183
  var profile = store.makeFixture('profile', {company: company});
179
- deepEqual(company.get('profile').toJSON(), profile.toJSON());
184
+ equal(company.get('profile'), profile);
180
185
 
181
186
  // but guard against a situation where a model can belong to itself
182
187
  // and do not want to set the belongsTo on this case.
183
188
  var hat1 = store.makeFixture('big_hat')
184
189
  var hat2 = store.makeFixture('big_hat', {hat: hat1})
185
- ok(hat1.get('hat') == null);
186
- ok(hat2.get('hat') == hat1);
190
+ equal(hat1.get('hat'), null);
191
+ equal(hat2.get('hat'), hat1);
187
192
  });
188
193
 
189
194
 
190
195
  test("belongsTo associations defined as attributes in fixture", function() {
191
196
  var project = store.makeFixture('project_with_user');
192
197
  equal(project.get('user') instanceof User, true)
193
- deepEqual(project.get('user').toJSON(),{name: 'User1', company: null, properties: []})
198
+ equal(project.get('user.name'), 'User1');
194
199
 
195
200
  var project = store.makeFixture('project_with_dude');
196
- deepEqual(project.get('user').toJSON(),{name: 'Dude', company: null, properties: []})
201
+ equal(project.get('user.name'), 'Dude');
197
202
 
198
203
  var project = store.makeFixture('project_with_admin');
199
- deepEqual(project.get('user').toJSON(),{name: 'Admin', company: null, properties: []})
204
+ equal(project.get('user.name'), 'Admin');
200
205
  });
201
206
 
202
207
 
@@ -222,8 +227,8 @@ test("creates records in the store", function() {
222
227
  var users = store.makeList('user', 2);
223
228
 
224
229
  var storeUsers = store.all('user').get('content');
225
- deepEqual(storeUsers[0].toJSON(), users[0].toJSON());
226
- deepEqual(storeUsers[1].toJSON(), users[1].toJSON());
230
+ equal(storeUsers[0], users[0]);
231
+ equal(storeUsers[1], users[1]);
227
232
  });
228
233
 
229
234
 
@@ -30,3 +30,22 @@ test("#buildURL with namespace and host", function () {
30
30
  equal(testHelper.buildURL('project'), 'https://dude.com/api/v1/projects');
31
31
  })
32
32
 
33
+ //asyncTest("#handleFind handles associations", function() {
34
+ // var projectJSON = FactoryGuy.build('project');
35
+ // var userJSON = FactoryGuy.build('user', {projects: [projectJSON.id]});
36
+ // projectJSON.user = userJSON.id
37
+ //
38
+ // testHelper.handleSideloadFind('user', userJSON, {projects: [projectJSON]})
39
+ //
40
+ // store.find('user', userJSON.id).then(function(user) {
41
+ // console.log(user.toJSON())
42
+ // console.log(userJSON)
43
+ //// console.log(user+'',user.get('projects.firstObject').toJSON())
44
+ //// console.log(user.get('projects.firstObject.user')+'')
45
+ //// ok(user.toJSON() == userJSON)
46
+ // ok(user instanceof User)
47
+ // ok(user.get('projects.firstObject.user') == user)
48
+ //// deepEqual(user.get('projects.firstObject').toJSON(), project)
49
+ // start();
50
+ // });
51
+ //});
@@ -88,11 +88,9 @@ asyncTest("#makeFixture sets belongsTo on hasMany associations", function () {
88
88
  var user = store.makeFixture('user', {projects: [p1]})
89
89
 
90
90
  store.find('user', 1).then(function (user) {
91
- user.get('projects').then(function (projects) {
92
- equal(projects.get('length'), 1, "adds hasMany records");
93
- equal(projects.get('firstObject.user.id'), user.id, "sets belongsTo record");
94
- start();
95
- })
91
+ var projects = user.get('projects');
92
+ equal(projects.members.list.length, 1, "adds hasMany records");
93
+ start();
96
94
  })
97
95
  })
98
96
 
@@ -102,11 +100,10 @@ asyncTest("#makeFixture adds record to hasMany association array for which it be
102
100
  var projectJson = store.makeFixture('project', {user: userJson});
103
101
 
104
102
  store.find('user', userJson.id).then(function (user) {
105
- user.get('projects').then(function (projects) {
106
- equal(projects.get('length'), 1, "adds hasMany records");
107
- equal(projects.get('firstObject.user.id'), user.id, "sets belongsTo record");
108
- start();
109
- })
103
+ var projects = user.get('projects');
104
+ equal(projects.members.list.length, 1, "adds hasMany records");
105
+ equal(projects.manyArray.get('firstObject.user'), user, "sets belongsTo record");
106
+ start();
110
107
  })
111
108
  })
112
109
 
@@ -115,11 +112,10 @@ asyncTest("#makeFixture handles default belongsTo associations in fixture", func
115
112
  equal(User.FIXTURES.length, 1);
116
113
 
117
114
  store.find('user', 1).then(function (user) {
118
- user.get('projects').then(function (projects) {
119
- equal(projects.get('length'), 1, "adds hasMany records");
120
- equal(projects.get('firstObject.user.id'), 1, "sets belongsTo record");
121
- start();
122
- })
115
+ var projects = user.get('projects');
116
+ equal(projects.members.list.length, 1, "adds hasMany records");
117
+ equal(projects.manyArray.get('firstObject.user.id'), 1, "sets belongsTo record");
118
+ start();
123
119
  })
124
120
  // TODO.. have to make belongsTo async for fixture adapter
125
121
  // to get this to work
@@ -134,25 +130,24 @@ asyncTest("#makeFixture handles default belongsTo associations in fixture", func
134
130
  })
135
131
 
136
132
 
137
- // TODO this test is failing on ember-data-1.0.0.beta9 .. fix one day?
138
- //asyncTest("#createRecord adds belongsTo association to records it hasMany of", function () {
139
- // var user = store.makeFixture('user');
140
- //
141
- // store.find('user', user.id).then(function (user) {
142
- //
143
- // var projectJson = {title: 'project', user: user};
144
- //
145
- // store.createRecord('project', projectJson).save()
146
- // .then(function (project) {
147
- // return Ember.RSVP.all([project.get('user'), user.get('projects')]);
148
- // }).then(function (promises) {
149
- // var projectUser = promises[0], projects = promises[1];
150
- // equal(projectUser.get('id'), user.get('id'));
151
- // equal(projects.get('length'), 1);
152
- // start();
153
- // });
154
- // })
155
- //})
133
+ asyncTest("#createRecord adds belongsTo association to records it hasMany of", function () {
134
+ var user = store.makeFixture('user');
135
+
136
+ store.find('user', user.id).then(function (user) {
137
+
138
+ var projectJson = {title: 'project', user: user};
139
+
140
+ store.createRecord('project', projectJson).save()
141
+ .then(function (project) {
142
+ return Ember.RSVP.all([project.get('user'), user.get('projects')]);
143
+ }).then(function (promises) {
144
+ var projectUser = promises[0], projects = promises[1];
145
+ equal(projectUser, user);
146
+ equal(projects.members.list.length, 1);
147
+ start();
148
+ });
149
+ })
150
+ })
156
151
 
157
152
  asyncTest("#createRecord can work for one-to-none associations", function () {
158
153
  var user = store.makeFixture('user');
@@ -179,14 +174,9 @@ asyncTest("#createRecord adds hasMany association to records it hasMany of ", fu
179
174
  var propertyJson = {name: 'beach front property'};
180
175
 
181
176
  var property = store.createRecord('property', propertyJson);
182
- property.get('owners').then(function (owners) {
183
- owners.addObjects(users);
184
- return property.save();
185
- }).then(function (property) {
186
- return property.get('owners');
187
- }).then(function (users) {
188
- equal(users.get('length'), usersJson.length);
189
- start();
190
- });
177
+ var owners = property.get('owners')
178
+ owners.manyArray.addObjects(users);
179
+ equal(users.get('length'), usersJson.length);
180
+ start();
191
181
  })
192
182
  })
@@ -22,8 +22,8 @@ test("#resetModels clears the store of models, and resets the model definition",
22
22
 
23
23
  FactoryGuy.resetModels(store);
24
24
 
25
- equal(store.all('user').get('content.length'),0)
26
- equal(store.all('project').get('content.length'),0)
25
+ equal(store.all('user').get('content.length'), 0)
26
+ equal(store.all('project').get('content.length'), 0)
27
27
 
28
28
  for (model in FactoryGuy.modelDefinitions) {
29
29
  var definition = FactoryGuy.modelDefinitions[model];
@@ -53,8 +53,8 @@ test("creates DS.Model instances", function() {
53
53
  asyncTest("creates records in the store", function() {
54
54
  var user = store.makeFixture('user');
55
55
 
56
- store.find('user', user.id).then ( function(store_user) {
57
- deepEqual(store_user.toJSON(), user.toJSON());
56
+ store.find('user', user.id).then( function(store_user) {
57
+ equal(store_user, user);
58
58
  start()
59
59
  });
60
60
  });
@@ -64,7 +64,7 @@ test("when hasMany associations assigned, belongTo parent is assigned", function
64
64
  var project = store.makeFixture('project');
65
65
  var user = store.makeFixture('user', {projects: [project]})
66
66
 
67
- deepEqual(project.get('user').toJSON(), user.toJSON());
67
+ equal(project.get('user'), user);
68
68
  });
69
69
 
70
70
 
@@ -73,7 +73,7 @@ asyncTest("when asnyc hasMany associations assigned, belongTo parent is assigned
73
73
  var company = store.makeFixture('company', {users: [user]});
74
74
 
75
75
  user.get('company').then(function(c){
76
- deepEqual(c.toJSON(), company.toJSON())
76
+ equal(c, company);
77
77
  start();
78
78
  })
79
79
  });
@@ -82,28 +82,30 @@ asyncTest("when asnyc hasMany associations assigned, belongTo parent is assigned
82
82
  test("when polymorphic hasMany associations are assigned, belongTo parent is assigned", function() {
83
83
  var bh = store.makeFixture('big_hat');
84
84
  var sh = store.makeFixture('small_hat');
85
- var user = store.makeFixture('user', {hats: [bh, sh]})
85
+ var user = store.makeFixture('user', {hats: [bh, sh]});
86
86
 
87
- equal(user.get('hats.length'), 2);
88
- ok(user.get('hats.firstObject') instanceof BigHat)
89
- ok(user.get('hats.lastObject') instanceof SmallHat)
87
+ equal(user.get('hats.members.list.length'), 2);
88
+ ok(user.get('hats.manyArray.firstObject') instanceof BigHat)
89
+ ok(user.get('hats.manyArray.lastObject') instanceof SmallHat)
90
90
  // sets the belongTo user association
91
- ok(bh.get('user') == user)
92
- ok(sh.get('user') == user)
91
+ equal(bh.get('user'), user)
92
+ equal(sh.get('user'), user)
93
93
  });
94
94
 
95
95
 
96
96
  test("when hasMany associations are assigned, belongsTo parent is assigned using inverse", function() {
97
97
  var project = store.makeFixture('project');
98
98
  var project2 = store.makeFixture('project', {children: [project]});
99
- deepEqual(project.get('parent').toJSON(), project2.toJSON());
99
+
100
+ equal(project.get('parent'), project2);
100
101
  });
101
102
 
102
103
 
103
104
  test("when hasMany associations are assigned, belongsTo parent is assigned using actual belongsTo name", function() {
104
105
  var silk = store.makeFixture('silk');
105
106
  var bh = store.makeFixture('big_hat', {materials: [silk]});
106
- ok(silk.get('hat') == bh)
107
+
108
+ equal(silk.get('hat'), bh)
107
109
  });
108
110
 
109
111
 
@@ -112,9 +114,9 @@ test("when belongTo parent is assigned, parent adds to hasMany records", functio
112
114
  var project1 = store.makeFixture('project', {user: user});
113
115
  var project2 = store.makeFixture('project', {user: user});
114
116
 
115
- equal(user.get('projects.length'), 2);
116
- deepEqual(user.get('projects.firstObject').toJSON(), project1.toJSON());
117
- deepEqual(user.get('projects.lastObject').toJSON(), project2.toJSON());
117
+ equal(user.get('projects.members.list.length'), 2);
118
+ equal(user.get('projects.manyArray.firstObject'), project1);
119
+ equal(user.get('projects.manyArray.lastObject'), project2);
118
120
  });
119
121
 
120
122
 
@@ -123,9 +125,9 @@ test("when belongTo parent is assigned, parent adds to polymorphic hasMany recor
123
125
  store.makeFixture('big_hat', {user: user});
124
126
  store.makeFixture('small_hat', {user: user});
125
127
 
126
- equal(user.get('hats.length'), 2);
127
- ok(user.get('hats.firstObject') instanceof BigHat)
128
- ok(user.get('hats.lastObject') instanceof SmallHat)
128
+ equal(user.get('hats.members.list.length'), 2);
129
+ ok(user.get('hats.manyArray.firstObject') instanceof BigHat)
130
+ ok(user.get('hats.manyArray.lastObject') instanceof SmallHat)
129
131
  });
130
132
 
131
133
 
@@ -134,9 +136,9 @@ asyncTest("when async hasMany relationship is assigned, model relationship is sy
134
136
  var user1 = store.makeFixture('user', {properties: [property]});
135
137
  var user2 = store.makeFixture('user', {properties: [property]});
136
138
 
137
- equal(property.get('owners.length'), 2);
138
- deepEqual(property.get('owners.firstObject').toJSON(), user1.toJSON());
139
- deepEqual(property.get('owners.lastObject').toJSON(), user2.toJSON());
139
+ equal(property.get('owners.members.list.length'), 2);
140
+ deepEqual(property.get('owners.manyArray.firstObject'), user1);
141
+ deepEqual(property.get('owners.manyArray.lastObject'), user2);
140
142
  start();
141
143
  });
142
144
 
@@ -146,9 +148,9 @@ asyncTest("when async belongsTo parent is assigned, parent adds to hasMany recor
146
148
  var user2 = store.makeFixture('user');
147
149
  var company = store.makeFixture('company', {users: [user1, user2]});
148
150
 
149
- equal(company.get('users.length'), 2);
150
- deepEqual(company.get('users.firstObject').toJSON(), user1.toJSON());
151
- deepEqual(company.get('users.lastObject').toJSON(), user2.toJSON());
151
+ equal(company.get('users.members.list.length'), 2);
152
+ equal(company.get('users.manyArray.firstObject'), user1);
153
+ equal(company.get('users.manyArray.lastObject'), user2);
152
154
  start();
153
155
  });
154
156
 
@@ -156,57 +158,59 @@ asyncTest("when async belongsTo parent is assigned, parent adds to hasMany recor
156
158
  test("when belongTo parent is assigned, parent adds to hasMany record using inverse", function() {
157
159
  var project = store.makeFixture('project');
158
160
  var project2 = store.makeFixture('project', {parent: project});
159
- equal(project.get('children.length'), 1);
160
- deepEqual(project.get('children.firstObject').toJSON(), project2.toJSON());
161
+
162
+ equal(project.get('children.members.list.length'), 1);
163
+ equal(project.get('children.manyArray.firstObject'), project2);
161
164
  });
162
165
 
163
166
 
164
167
  test("when belongTo parent is assigned, parent adds to hasMany record using actual hasMany name", function() {
165
168
  var bh = store.makeFixture('big_hat');
166
169
  var silk = store.makeFixture('silk', {hat: bh});
167
- ok(bh.get('materials.firstObject') == silk)
170
+
171
+ equal(bh.get('materials.manyArray.firstObject'), silk)
168
172
  });
169
173
 
170
174
 
171
175
  test("when belongTo parent is assigned, parent adds to belongsTo record", function() {
172
176
  var company = store.makeFixture('company');
173
177
  var profile = store.makeFixture('profile', {company: company});
174
- deepEqual(company.get('profile').toJSON(), profile.toJSON());
178
+ equal(company.get('profile'), profile);
175
179
 
176
180
  // but guard against a situation where a model can belong to itself
177
181
  // and do not want to set the belongsTo on this case.
178
182
  var hat1 = store.makeFixture('big_hat')
179
183
  var hat2 = store.makeFixture('big_hat', {hat: hat1})
180
- ok(hat1.get('hat') == null);
181
- ok(hat2.get('hat') == hat1);
184
+ equal(hat1.get('hat'), null);
185
+ equal(hat2.get('hat'), hat1);
182
186
  });
183
187
 
184
188
 
185
189
  test("belongsTo associations defined as attributes in fixture", function() {
186
190
  var project = store.makeFixture('project_with_user');
187
191
  equal(project.get('user') instanceof User, true)
188
- deepEqual(project.get('user').toJSON(),{name: 'User1', company: null, properties: []})
192
+ equal(project.get('user.name'), 'User1');
189
193
 
190
194
  var project = store.makeFixture('project_with_dude');
191
- deepEqual(project.get('user').toJSON(),{name: 'Dude', company: null, properties: []})
195
+ equal(project.get('user.name'), 'Dude');
192
196
 
193
197
  var project = store.makeFixture('project_with_admin');
194
- deepEqual(project.get('user').toJSON(),{name: 'Admin', company: null, properties: []})
198
+ equal(project.get('user.name'), 'Admin');
195
199
  });
196
200
 
197
201
 
198
202
  test("hasMany associations defined as attributes in fixture", function() {
199
203
  var user = store.makeFixture('user_with_projects');
200
- equal(user.get('projects.length'), 2)
201
- equal(user.get('projects.firstObject.user'), user)
202
- equal(user.get('projects.lastObject.user'), user)
204
+ equal(user.get('projects.members.list.length'), 2)
205
+ equal(user.get('projects.manyArray.firstObject.user'), user)
206
+ equal(user.get('projects.manyArray.lastObject.user'), user)
203
207
  })
204
208
 
205
209
  test("hasMany associations defined with traits", function() {
206
210
  var user = store.makeFixture('user', 'with_projects');
207
- equal(user.get('projects.length'), 2)
208
- equal(user.get('projects.firstObject.user'), user)
209
- equal(user.get('projects.lastObject.user'), user)
211
+ equal(user.get('projects.members.list.length'), 2)
212
+ equal(user.get('projects.manyArray.firstObject.user'), user)
213
+ equal(user.get('projects.manyArray.lastObject.user'), user)
210
214
  })
211
215
 
212
216
 
@@ -232,6 +236,6 @@ test("creates records in the store", function() {
232
236
  var users = store.makeList('user', 2);
233
237
 
234
238
  var storeUsers = store.all('user').get('content');
235
- deepEqual(storeUsers[0].toJSON(), users[0].toJSON());
236
- deepEqual(storeUsers[1].toJSON(), users[1].toJSON());
239
+ equal(storeUsers[0], users[0]);
240
+ equal(storeUsers[1], users[1]);
237
241
  });