Fix #4461: Improve posts/index page titles.
This commit is contained in:
@@ -467,8 +467,8 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
context "in safe mode" do
|
||||
should "not include the rating:s tag in the page title" do
|
||||
get posts_path(tags: "1girl", safe_mode: true)
|
||||
assert_select "title", text: "1girl Art | Safebooru"
|
||||
get posts_path(tags: "fate/grand_order", safe_mode: true)
|
||||
assert_select "title", text: "Fate/Grand Order | Safebooru"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -13,13 +13,6 @@ class PostQueryBuilderTest < ActiveSupport::TestCase
|
||||
assert_equal(count, PostQuery.normalize(query, **query_options).with_implicit_metatags.fast_count(**fast_count_options))
|
||||
end
|
||||
|
||||
def assert_parse_equals(expected, query)
|
||||
assert_equal(expected, PostQueryBuilder.new(query).split_query)
|
||||
|
||||
# parsing, serializing, then parsing again should produce the same result.
|
||||
assert_equal(PostQuery.new(query).to_s, PostQuery.new(PostQuery.new(query).to_s).to_s)
|
||||
end
|
||||
|
||||
setup do
|
||||
CurrentUser.user = create(:user)
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
@@ -1387,17 +1380,6 @@ class PostQueryBuilderTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
context "Parsing:" do
|
||||
should "split a query" do
|
||||
assert_equal(%w(aaa bbb), PostQueryBuilder.new("aaa bbb").split_query)
|
||||
end
|
||||
|
||||
should "not strip out valid characters when scanning" do
|
||||
assert_equal(%w(aaa bbb), PostQueryBuilder.new("aaa bbb").split_query)
|
||||
assert_equal(%w(favgroup:yondemasu_yo,_azazel-san. pool:ichigo_100%), PostQueryBuilder.new("favgroup:yondemasu_yo,_azazel-san. pool:ichigo_100%").split_query)
|
||||
end
|
||||
end
|
||||
|
||||
context "#fast_count" do
|
||||
setup do
|
||||
create(:tag, name: "grey_skirt", post_count: 100)
|
||||
|
||||
Reference in New Issue
Block a user