Skip to content

Commit

Permalink
Merge pull request #74 from quaertym/patch-2
Browse files Browse the repository at this point in the history
Update test-module-for-model.js
  • Loading branch information
rwjblue committed Jul 6, 2015
2 parents f3f653a + 923767f commit 4320bf0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ember-test-helpers/test-module-for-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ 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) {
callbacks.subject = function(options) {
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);
});
};
}
Expand Down

0 comments on commit 4320bf0

Please sign in to comment.