diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index 0762e1edc..2dab0f379 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -109,7 +109,7 @@ module Danbooru # Return true if the given tag shouldn't count against the user's tag search limit. def is_unlimited_tag?(term) - term.type == :metatag && term.name.in?(%w[status rating limit]) + term.type == :metatag && term.name.in?(%w[-status status rating limit]) end # After this many pages, the paginator will switch to sequential mode. diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index c4e412199..ddcb73e7a 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -1983,6 +1983,13 @@ class PostTest < ActiveSupport::TestCase Cache.expects(:put).with(Post.count_cache_key("aaa score:42"), 1, 180) Post.fast_count("aaa score:42") end + + should "work with the hide_deleted_posts option turned on" do + user = create(:user, hide_deleted_posts: true) + as(user) do + assert_equal(1, Post.fast_count("aaa score:42")) + end + end end context "a blank search" do