Created
January 11, 2018 14:45
-
-
Save khornberg/02872d1adbe4cf97ff72c14d830edc88 to your computer and use it in GitHub Desktop.
ember integration test with store
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on the work at https://www.mutuallyhuman.com/blog/2016/01/22/component-integration-testing-in-ember