Last active
August 29, 2015 14:02
-
-
Save danfinlay/4ea194e23843a0bede12 to your computer and use it in GitHub Desktop.
Problematic Unit Test in Ember needs some kind of Ember.run() application.
This file contains hidden or 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
| test('Post has a user', function() { | |
| expect(1); | |
| var store = this.container.lookup('store:main'); | |
| var Post = this.container.lookupFactory('model:post'); | |
| var User = this.container.lookupFactory('model:user'); | |
| var user = store.createRecord('user', {name:"Bob"}); | |
| var post = store.createRecord('post', { | |
| body:"Hey!", | |
| user: user | |
| }); | |
| ok(post.get('user.name') === user.get('name'), 'Post user is set correctly."); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment