remove references to locks

This commit is contained in:
Lily
2021-10-24 15:16:48 -03:00
parent a9088d8a87
commit 647848b499
5 changed files with 3 additions and 11 deletions

View File

@@ -15,7 +15,6 @@ class AutocompleteService
child: %w[any none] + POST_STATUSES, child: %w[any none] + POST_STATUSES,
parent: %w[any none] + POST_STATUSES, parent: %w[any none] + POST_STATUSES,
rating: %w[safe questionable explicit], rating: %w[safe questionable explicit],
locked: %w[rating note status],
embedded: %w[true false], embedded: %w[true false],
filetype: %w[jpg png gif swf zip webm mp4], filetype: %w[jpg png gif swf zip webm mp4],
commentary: %w[true false translated untranslated], commentary: %w[true false translated untranslated],

View File

@@ -34,7 +34,7 @@ class PostQueryBuilder
METATAGS = %w[ METATAGS = %w[
user approver commenter comm noter noteupdater artcomm commentaryupdater user approver commenter comm noter noteupdater artcomm commentaryupdater
flagger appealer upvote downvote fav ordfav favgroup ordfavgroup pool flagger appealer upvote downvote fav ordfav favgroup ordfavgroup pool
ordpool note comment commentary id rating locked source status filetype ordpool note comment commentary id rating source status filetype
disapproved parent child search embedded md5 width height mpixels ratio disapproved parent child search embedded md5 width height mpixels ratio
score favcount filesize date age order limit tagcount pixiv_id pixiv score favcount filesize date age order limit tagcount pixiv_id pixiv
unaliased exif duration unaliased exif duration

View File

@@ -42,7 +42,6 @@ class AutocompleteTest < ApplicationSystemTestCase
should "work for static metatags" do should "work for static metatags" do
assert_metatag_autocomplete_equals(%w[any none], "child") assert_metatag_autocomplete_equals(%w[any none], "child")
assert_metatag_autocomplete_equals(%w[any none], "parent") assert_metatag_autocomplete_equals(%w[any none], "parent")
assert_metatag_autocomplete_equals(%w[rating note status], "locked")
assert_metatag_autocomplete_equals(%w[safe questionable explicit], "rating") assert_metatag_autocomplete_equals(%w[safe questionable explicit], "rating")
assert_metatag_autocomplete_equals(%w[gif jpg mp4 png swf webm zip], "filetype") assert_metatag_autocomplete_equals(%w[gif jpg mp4 png swf webm zip], "filetype")
assert_metatag_autocomplete_equals(%w[active any banned deleted flagged modqueue pending unmoderated], "status") assert_metatag_autocomplete_equals(%w[active any banned deleted flagged modqueue pending unmoderated], "status")

View File

@@ -174,10 +174,6 @@ class AutocompleteServiceTest < ActiveSupport::TestCase
assert_autocomplete_equals(["rating:questionable"], "rating:q", :tag_query) assert_autocomplete_equals(["rating:questionable"], "rating:q", :tag_query)
assert_autocomplete_equals(["rating:explicit"], "rating:e", :tag_query) assert_autocomplete_equals(["rating:explicit"], "rating:e", :tag_query)
assert_autocomplete_equals(["locked:rating"], "locked:r", :tag_query)
assert_autocomplete_equals(["locked:status"], "locked:s", :tag_query)
assert_autocomplete_equals(["locked:note"], "locked:n", :tag_query)
assert_autocomplete_equals(["embedded:true"], "embedded:t", :tag_query) assert_autocomplete_equals(["embedded:true"], "embedded:t", :tag_query)
assert_autocomplete_equals(["embedded:false"], "embedded:f", :tag_query) assert_autocomplete_equals(["embedded:false"], "embedded:f", :tag_query)

View File

@@ -414,8 +414,6 @@ class PostTest < ActiveSupport::TestCase
should allow_value("touhou child:1").for(:tag_string) should allow_value("touhou child:1").for(:tag_string)
should allow_value("touhou source:foo").for(:tag_string) should allow_value("touhou source:foo").for(:tag_string)
should allow_value("touhou rating:z").for(:tag_string) should allow_value("touhou rating:z").for(:tag_string)
should allow_value("touhou locked:rating").for(:tag_string)
should allow_value("touhou -locked:rating").for(:tag_string)
# \u3000 = ideographic space, \u00A0 = no-break space # \u3000 = ideographic space, \u00A0 = no-break space
should allow_value("touhou\u3000foo").for(:tag_string) should allow_value("touhou\u3000foo").for(:tag_string)
@@ -676,7 +674,7 @@ class PostTest < ActiveSupport::TestCase
context "for a rating" do context "for a rating" do
context "that is valid" do context "that is valid" do
should "update the rating if the post is unlocked" do should "update the rating" do
@post.update(tag_string: "aaa rating:e") @post.update(tag_string: "aaa rating:e")
@post.reload @post.reload
assert_equal("e", @post.rating) assert_equal("e", @post.rating)
@@ -1364,7 +1362,7 @@ class PostTest < ActiveSupport::TestCase
end end
end end
context "A rating unlocked post" do context "A post" do
setup { @post = FactoryBot.create(:post) } setup { @post = FactoryBot.create(:post) }
subject { @post } subject { @post }