FIX: Make sure `Post` records have access to `Site`

This commit is contained in:
Robin Ward 2017-09-25 13:18:26 -04:00
parent 073b74cf3f
commit b3ffa19f95
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,10 @@ function postStreamTest(name, attrs) {
widgetTest(name, {
template: `{{mount-widget widget="post-stream" args=(hash posts=posts)}}`,
beforeEach() {
this.set('posts', attrs.posts.call(this));
const site = this.container.lookup('site:main');
let posts = attrs.posts.call(this);
posts.forEach(p => p.set('site', site));
this.set('posts', posts);
},
test: attrs.test
});