Tag change notices
This adds a small notice at the bottom of post searches if a single tag search is the target of any tag change request.
This commit is contained in:
@@ -26,6 +26,28 @@ class AliasAndImplicationImporterTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
context "#affected_tags" do
|
||||
setup do
|
||||
FactoryBot.create(:post, tag_string: "aaa")
|
||||
FactoryBot.create(:post, tag_string: "bbb")
|
||||
FactoryBot.create(:post, tag_string: "ccc")
|
||||
FactoryBot.create(:post, tag_string: "ddd")
|
||||
FactoryBot.create(:post, tag_string: "eee")
|
||||
|
||||
@script = "create alias aaa -> 000\n" +
|
||||
"create implication bbb -> 111\n" +
|
||||
"remove alias ccc -> 222\n" +
|
||||
"remove implication ddd -> 333\n" +
|
||||
"mass update eee -> 444\n"
|
||||
end
|
||||
|
||||
subject { AliasAndImplicationImporter.new(@script, nil) }
|
||||
|
||||
should "return the correct tags" do
|
||||
assert_equal(%w(aaa 000 bbb 111 ccc 222 ddd 333 eee 444), subject.affected_tags)
|
||||
end
|
||||
end
|
||||
|
||||
context "#estimate_update_count" do
|
||||
setup do
|
||||
FactoryBot.create(:post, tag_string: "aaa")
|
||||
|
||||
Reference in New Issue
Block a user