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

View File

@ -8,7 +8,10 @@ function postStreamTest(name, attrs) {
widgetTest(name, { widgetTest(name, {
template: `{{mount-widget widget="post-stream" args=(hash posts=posts)}}`, template: `{{mount-widget widget="post-stream" args=(hash posts=posts)}}`,
beforeEach() { 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 test: attrs.test
}); });