v2.13.3
- fixes
mockFindRecord('modelName').returns({json})
when the json payload was a plain javascript object.- sometimes you just want to throw some plain json into the returns, and not a build('modelName') payload. And that was not working
Example:
// usually you would do this
let json = build('user', {name: 'Bob'});
let mock = mockFindRecord('modelName').returns({json});
mock.get('id') //=> 1
// but if you did this:
let json = {data: {id: 1, type: 'user', attributes: { name: 'Bob' }}}; // your own custom payload
let mock = mockFindRecord('modelName').returns({json});
mock.get('id') //=> thew exception