You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1113,7 +1113,7 @@ test("Using FactoryGuy.cacheOnlyMode with except", function() {
1113
1113
1114
1114
- Use property ```timesCalled``` to verify how many times the ajax call was mocked
1115
1115
- works when you are using mockQuery, mockQueryRecord, mockFindAll, or mockUpdate
1116
-
- mockFind will always be at most 1 since it will only make ajax call
1116
+
- mockFindRecord will always be at most 1 since it will only make ajax call
1117
1117
the first time, and then the store will use cache the second time
1118
1118
- Example:
1119
1119
```javascript
@@ -1162,40 +1162,40 @@ The `isDestroyed` property is set to `true` when the mock is destroyed.
1162
1162
let mock =mockFindAll('user').fails({status:401, response: errors401});
1163
1163
1164
1164
let errors422 = {errors: {name:"Name too short"}};
1165
-
let mock =mockFind('profile').fails({status:422, response: errors422});
1165
+
let mock =mockFindRecord('profile').fails({status:422, response: errors422});
1166
1166
1167
1167
let errorsMine = {errors: [{detail:"Name too short", title:"I am short"}]};
1168
-
let mock =mockFind('profile').fails({status:422, response: errorsMine, convertErrors:false});
1168
+
let mock =mockFindRecord('profile').fails({status:422, response: errorsMine, convertErrors:false});
1169
1169
```
1170
1170
1171
1171
1172
-
##### mockFind
1172
+
##### mockFindRecord
1173
1173
- For dealing with finding one record of a model type => `store.find('modelType')`
1174
1174
- Can pass in arguments just like you would for [make](https://github.com/danielspaniel/ember-data-factory-guy#make) or [build](https://github.com/danielspaniel/ember-data-factory-guy#build)
1175
-
- mockFind( fixture or model name, optional traits, optional attributes object)
1175
+
- mockFindRecord( fixture or model name, optional traits, optional attributes object)
1176
1176
- Takes modifier method `returns()` for controlling the response payload
1177
1177
- returns( model / json / id )
1178
-
- Sample acceptance tests using mockFind: [user-view-test.js:](https://github.com/danielspaniel/ember-data-factory-guy/blob/master/tests/acceptance/user-view-test.js)
1178
+
- Sample acceptance tests using mockFindRecord: [user-view-test.js:](https://github.com/danielspaniel/ember-data-factory-guy/blob/master/tests/acceptance/user-view-test.js)
0 commit comments