Fix broken tests.
This commit is contained in:
@@ -321,12 +321,18 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
|||||||
context "the nuke command" do
|
context "the nuke command" do
|
||||||
should "remove tags" do
|
should "remove tags" do
|
||||||
@post = create(:post, tag_string: "foo bar")
|
@post = create(:post, tag_string: "foo bar")
|
||||||
@bur1 = create_bur!("imply foo -> bar", @admin)
|
create_bur!("nuke bar", @admin)
|
||||||
@bur2 = create_bur!("nuke bar", @admin)
|
|
||||||
|
|
||||||
assert_equal("foo", @post.reload.tag_string)
|
assert_equal("foo", @post.reload.tag_string)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "remove implications" do
|
||||||
|
@ti = create(:tag_implication, antecedent_name: "foo", consequent_name: "bar")
|
||||||
|
create_bur!("nuke bar", @admin)
|
||||||
|
|
||||||
|
assert_equal("deleted", @ti.reload.status)
|
||||||
|
end
|
||||||
|
|
||||||
should "remove pools" do
|
should "remove pools" do
|
||||||
@pool = create(:pool)
|
@pool = create(:pool)
|
||||||
@post = create(:post, tag_string: "bar pool:#{@pool.id}")
|
@post = create(:post, tag_string: "bar pool:#{@pool.id}")
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ module Sources
|
|||||||
should "not translate '1000users入り' to '1'" do
|
should "not translate '1000users入り' to '1'" do
|
||||||
FactoryBot.create(:tag, name: "1", post_count: 1)
|
FactoryBot.create(:tag, name: "1", post_count: 1)
|
||||||
source = get_source("https://www.pixiv.net/member_illust.php?mode=medium&illust_id=60665428")
|
source = get_source("https://www.pixiv.net/member_illust.php?mode=medium&illust_id=60665428")
|
||||||
tags = %w[1000users入り Fate/GrandOrder アルジュナ(Fate) アルトリア・ペンドラゴン イシュタル(Fate) グランブルーファンタジー マシュ・キリエライト マーリン(Fate) 両儀式 手袋]
|
tags = %w[1000users入り Fate/GrandOrder 「両儀式」 アルジュナ(Fate) アルトリア・ペンドラゴン イシュタル(Fate) グランブルーファンタジー マシュ・キリエライト マーリン(Fate) 手袋]
|
||||||
|
|
||||||
assert_equal(tags.sort, source.tags.map(&:first).sort)
|
assert_equal(tags.sort, source.tags.map(&:first).sort)
|
||||||
assert_equal(["fate/grand_order"], source.translated_tags.map(&:name))
|
assert_equal(["fate/grand_order"], source.translated_tags.map(&:name))
|
||||||
|
|||||||
Reference in New Issue
Block a user