diff --git a/packages/ember-data/lib/system/store.js b/packages/ember-data/lib/system/store.js index 4d30bd2caeb..355c15a0885 100644 --- a/packages/ember-data/lib/system/store.js +++ b/packages/ember-data/lib/system/store.js @@ -1046,7 +1046,7 @@ Store = Service.extend({ @return {Promise} promise */ query: function(modelName, options) { - Ember.assert("You need to pass a namespaced query hash to the store's query method", options && options.query); + Ember.assert("You need to pass a query hash in the options hash of the store's query method", options && options.query); Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); var array = this.recordArrayManager @@ -1079,7 +1079,7 @@ Store = Service.extend({ queryRecord: function(modelName, options) { options = options || {}; Ember.assert("You need to pass a type to the store's queryRecord method", modelName); - Ember.assert("You need to pass a namespaced query hash to the store's queryRecord method", options && options.query); + Ember.assert("You need to pass a query hash in the options hash of the store's queryRecord method", options && options.query); Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); diff --git a/packages/ember-data/tests/integration/adapter/rest-adapter-test.js b/packages/ember-data/tests/integration/adapter/rest-adapter-test.js index e1c37af1094..95874b8d199 100644 --- a/packages/ember-data/tests/integration/adapter/rest-adapter-test.js +++ b/packages/ember-data/tests/integration/adapter/rest-adapter-test.js @@ -950,7 +950,7 @@ test("metadata is accessible", function() { })); }); -test("findQuery - if `sortQueryParams` option is not provided, query params are sorted alphabetically", function() { +test("query - if `sortQueryParams` option is not provided, query params are sorted alphabetically", function() { adapter.ajax = function(url, verb, hash) { passedUrl = url; passedVerb = verb; @@ -966,7 +966,7 @@ test("findQuery - if `sortQueryParams` option is not provided, query params are })); }); -test("findQuery - passes buildURL the requestType", function() { +test("query - passes buildURL the requestType", function() { adapter.buildURL = function(type, id, snapshot, requestType) { return "/" + requestType + "/posts"; }; @@ -982,7 +982,7 @@ test("findQuery - passes buildURL the requestType", function() { })); }); -test("findQuery - if `sortQueryParams` is falsey, query params are not sorted at all", function() { +test("query - if `sortQueryParams` is falsey, query params are not sorted at all", function() { adapter.ajax = function(url, verb, hash) { passedUrl = url; passedVerb = verb; @@ -1000,7 +1000,7 @@ test("findQuery - if `sortQueryParams` is falsey, query params are not sorted at })); }); -test("findQuery - if `sortQueryParams` is a custom function, query params passed through that function", function() { +test("query - if `sortQueryParams` is a custom function, query params passed through that function", function() { adapter.ajax = function(url, verb, hash) { passedUrl = url; passedVerb = verb; @@ -1027,7 +1027,7 @@ test("findQuery - if `sortQueryParams` is a custom function, query params passed })); }); -test("findQuery - payload 'meta' is accessible on the record array", function() { +test("query - payload 'meta' is accessible on the record array", function() { ajaxResponse({ meta: { offset: 5 }, posts: [{ id: 1, name: "Rails is very expensive sushi" }] @@ -1042,7 +1042,7 @@ test("findQuery - payload 'meta' is accessible on the record array", function() })); }); -test("findQuery - each record array can have its own meta object", function() { +test("query - each record array can have its own meta object", function() { ajaxResponse({ meta: { offset: 5 }, posts: [{ id: 1, name: "Rails is very expensive sushi" }] @@ -1066,7 +1066,7 @@ test("findQuery - each record array can have its own meta object", function() { }); -test("findQuery - returning an array populates the array", function() { +test("query - returning an array populates the array", function() { ajaxResponse({ posts: [ { id: 1, name: "Rails is omakase" }, @@ -1102,7 +1102,7 @@ test("findQuery - returning an array populates the array", function() { })); }); -test("findQuery - returning sideloaded data loads the data", function() { +test("query - returning sideloaded data loads the data", function() { ajaxResponse({ posts: [ { id: 1, name: "Rails is omakase" }, @@ -1118,7 +1118,7 @@ test("findQuery - returning sideloaded data loads the data", function() { })); }); -test("findQuery - data is normalized through custom serializers", function() { +test("query - data is normalized through custom serializers", function() { env.registry.register('serializer:post', DS.RESTSerializer.extend({ primaryKey: '_ID_', attrs: { name: '_NAME_' } diff --git a/packages/ember-data/tests/integration/adapter/queries-test.js b/packages/ember-data/tests/integration/store/queries-test.js similarity index 96% rename from packages/ember-data/tests/integration/adapter/queries-test.js rename to packages/ember-data/tests/integration/store/queries-test.js index 642081b93d8..9ec856a1169 100644 --- a/packages/ember-data/tests/integration/adapter/queries-test.js +++ b/packages/ember-data/tests/integration/store/queries-test.js @@ -2,7 +2,7 @@ var get = Ember.get; var Person, env, store, adapter; var run = Ember.run; -module("integration/adapter/queries - Queries", { +module("integration/store/queries - Queries", { setup: function() { Person = DS.Model.extend({ updatedAt: DS.attr('string'), diff --git a/packages/ember-data/tests/integration/store/query-record-test.js b/packages/ember-data/tests/integration/store/query-record-test.js index 94287f8bddc..7218d594ac4 100644 --- a/packages/ember-data/tests/integration/store/query-record-test.js +++ b/packages/ember-data/tests/integration/store/query-record-test.js @@ -30,7 +30,7 @@ test("It raises an assertion when no type is passed", function() { test("It raises an assertion when the query is not namespaced in a hash", function() { expectAssertion(function() { store.queryRecord('person', { withRelated: 'posts' }); - }, "You need to pass a namespaced query hash to the store's queryRecord method"); + }, "You need to pass a query hash in the options hash of the store's queryRecord method"); }); test("When a record is requested, the adapter's queryRecord method should be called.", function() {