Skip to content

Instantly share code, notes, and snippets.

@khornberg
Created January 11, 2018 14:45
Show Gist options
  • Save khornberg/02872d1adbe4cf97ff72c14d830edc88 to your computer and use it in GitHub Desktop.
Save khornberg/02872d1adbe4cf97ff72c14d830edc88 to your computer and use it in GitHub Desktop.
ember integration test with store
let store = (container) => {
const store = container.lookup('service:store');
Ember.run(() => {
store.createRecord('model', {
modelAttr: 'one'
});
store.createRecord('model', {
modelAttr: 'two'
});
});
return store;
};
test('test component using the store', function(assert) {
this.set('store', store(this.container));
this.render(hbs `{{my-component store=store}}`);
// assert.ok();
});
@khornberg
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment