Fix #4983: Weird result for status:DELETED.
This commit is contained in:
@@ -119,7 +119,7 @@ module PostSets
|
|||||||
|
|
||||||
def show_deleted?
|
def show_deleted?
|
||||||
query.select_metatags("status").any? do |metatag|
|
query.select_metatags("status").any? do |metatag|
|
||||||
metatag.value.in?(%w[all any active unmoderated modqueue deleted appealed])
|
metatag.value.downcase.in?(%w[all any active unmoderated modqueue deleted appealed])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -184,6 +184,12 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
|
|||||||
get_auth posts_path(tags: "foo"), @user
|
get_auth posts_path(tags: "foo"), @user
|
||||||
assert_select ".tag-change-notice"
|
assert_select ".tag-change-notice"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "show deleted posts for a status:DELETED search" do
|
||||||
|
create(:post, is_deleted: true)
|
||||||
|
get_auth posts_path(tags: "status:DELETED"), @user
|
||||||
|
assert_select ".post-preview.post-status-deleted", count: 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with a multi-tag search" do
|
context "with a multi-tag search" do
|
||||||
|
|||||||
Reference in New Issue
Block a user