Fix #4554: Searches with "-status:active" not showing deleted posts.

Also fixes #4542: Quoted search metatag status:"deleted" yields no results.
This commit is contained in:
evazion
2020-08-12 20:53:14 -05:00
parent d884cb6642
commit 78b9613498
3 changed files with 29 additions and 13 deletions
+12
View File
@@ -361,6 +361,18 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
assert_response :success
assert_select "#post_#{@post.id}", 1
end
should 'show deleted posts when searching for status:"deleted"' do
get posts_path(tags: 'status:"deleted"')
assert_response :success
assert_select "#post_#{@post.id}", 1
end
should "show deleted posts when searching for -status:active" do
get posts_path(tags: "-status:active")
assert_response :success
assert_select "#post_#{@post.id}", 1
end
end
context "with restricted posts" do