2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

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
commit afbdf9c2d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 1 deletions

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() {