Skip to content

Commit

Permalink
Merge pull request #4256 from bmac/revert-3864
Browse files Browse the repository at this point in the history
[BUGFIX release] Revert pr #3864
  • Loading branch information
bmac committed Mar 21, 2016
2 parents e57f67e + 274d7b1 commit c230d28
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion addon/-private/system/store/finders.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export function _queryRecord(adapter, store, typeClass, query) {
var record;
store._adapterRun(function() {
var payload = normalizeResponseHelper(serializer, store, typeClass, adapterPayload, null, 'queryRecord');
assert('`store.queryRecord` expected the adapter to return one record but the response from the adapter was empty.', payload.data);
//TODO Optimize
record = store.push(payload);
});
Expand Down
12 changes: 0 additions & 12 deletions tests/integration/adapter/rest-adapter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1337,18 +1337,6 @@ test("queryRecord - returning an array picks the first one but saves all records
}));
});

testInDebug("queryRecord - returning an empty array errors", function(assert) {
ajaxResponse({
post: []
});

assert.expectAssertion(function() {
Ember.run(function() {
store.queryRecord('post', { slug: 'rails-is-omakaze' });
});
}, /`store.queryRecord` expected the adapter to return one record/);
});

test("queryRecord - data is normalized through custom serializers", function(assert) {
env.registry.register('serializer:post', DS.RESTSerializer.extend({
primaryKey: '_ID_',
Expand Down

0 comments on commit c230d28

Please sign in to comment.