Merge pull request #6558 from pmusaraj/disallow-flagging-deleted-post

FIX: disable flagging hidden posts
This commit is contained in:
Jeff Atwood
2018-11-05 11:05:32 -08:00
committed by GitHub
4 changed files with 19 additions and 1 deletions
+10
View File
@@ -389,6 +389,16 @@ widgetTest(`flagging: can't flag`, {
}
});
widgetTest(`flagging: can't flag when post is hidden`, {
template: '{{mount-widget widget="post" args=args}}',
beforeEach() {
this.set("args", { canFlag: true, hidden: true });
},
test(assert) {
assert.ok(this.$("button.create-flag").length === 0);
}
});
widgetTest(`read indicator`, {
template: '{{mount-widget widget="post" args=args}}',
beforeEach() {