From 923767f41347631ea9aa4f50a2ced65b1ca95754 Mon Sep 17 00:00:00 2001 From: Emre Unal Date: Mon, 6 Jul 2015 03:02:32 +0300 Subject: [PATCH] Update test-module-for-model.js This is to avoid deprecation warning: ``` You tried to look up 'store:main', but this has been deprecated in favor of 'service:store'. ``` --- lib/ember-test-helpers/test-module-for-model.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ember-test-helpers/test-module-for-model.js b/lib/ember-test-helpers/test-module-for-model.js index cd7ca4ca2..5942eb7af 100644 --- a/lib/ember-test-helpers/test-module-for-model.js +++ b/lib/ember-test-helpers/test-module-for-model.js @@ -23,8 +23,8 @@ export default TestModule.extend({ callbacks.store = function(){ var container = this.container; - - return container.lookup('store:main'); + var store = container.lookup('service:store') || container.lookup('store:main'); + return store; }; if (callbacks.subject === defaultSubject) { @@ -32,7 +32,8 @@ export default TestModule.extend({ var container = this.container; return Ember.run(function() { - return container.lookup('store:main').createRecord(modelName, options); + var store = container.lookup('service:store') || container.lookup('store:main'); + return store.createRecord(modelName, options); }); }; }