Skip to content

Commit

Permalink
[CLEANUP beta] Fix deprecation warnings
Browse files Browse the repository at this point in the history
- register store as Ember.Service in the tests
- remove deprecated Ember.View from tests
- use store.query instead of deprecated store.findQuery
- use store.findAll(type) instead of deprecated store.find(type)
- use Object.keys instead of deprecated Ember.keys in tests/index.html
  • Loading branch information
pangratz committed Jun 24, 2015
1 parent 23a5b13 commit 8553200
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ test('find many records', function() {
}]);

run(function() {
store.find('post', { filter: { id: 1 } }).then(function(posts) {
store.query('post', { filter: { id: 1 } }).then(function(posts) {
equal(passedUrl[0], '/posts');
deepEqual(passedHash[0], { data: { filter: { id: 1 } } });

Expand Down
7 changes: 2 additions & 5 deletions packages/ember-data/tests/integration/application-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var run = Ember.run;
var Application = Ember.Application;
var Controller = Ember.Controller;
var View = Ember.View;
var Store = DS.Store;
var Namespace = Ember.Namespace;

Expand All @@ -24,9 +23,8 @@ module("integration/application - Injecting a Custom Store", {
setup: function() {
run(function() {
app = Application.create({
ApplicationStore: Store.extend({ isCustom: true }),
StoreService: Store.extend({ isCustom: true }),
FooController: Controller.extend(),
ApplicationView: View.extend(),
BazController: {},
ApplicationController: Controller.extend(),
rootElement: '#qunit-fixture'
Expand Down Expand Up @@ -83,7 +81,6 @@ module("integration/application - Injecting the Default Store", {
run(function() {
app = Application.create({
FooController: Controller.extend(),
ApplicationView: View.extend(),
BazController: {},
ApplicationController: Controller.extend()
});
Expand Down Expand Up @@ -120,7 +117,7 @@ if (Ember.inject && Ember.inject.service) {
setup: function() {
run(function() {
app = Application.create({
DoodleService: Ember.Object.extend({ store: Ember.inject.service() })
DoodleService: Ember.Service.extend({ store: Ember.inject.service() })
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module("DS.DebugAdapter", {
App = Ember.Application.create();
App.toString = function() { return 'App'; };

App.ApplicationStore = DS.Store.extend({
App.StoreService = DS.Store.extend({
adapter: DS.Adapter.extend()
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ test("store should not reload record array when shouldReloadAll returns false",
});

run(function() {
store.find('person');
store.findAll('person');
});
});

Expand Down
2 changes: 1 addition & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

var skipPackageRegexp = new RegExp('^('+skipPackages.join('|')+')/');

var keys = Ember.keys(requirejs.entries);
var keys = Object.keys(requirejs.entries);

for (var i = 0, length = keys.length; i < length; i++) {
var moduleName = keys[i];
Expand Down

0 comments on commit 8553200

Please sign in to comment.