mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
FIX: Make sure Post
records have access to Site
This commit is contained in:
parent
073b74cf3f
commit
b3ffa19f95
@ -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
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user