BURs: fix exception in category change requests for new tags.
`category blah -> character` failed when `blah` didn't exist yet.
This commit is contained in:
@@ -160,6 +160,14 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
||||
|
||||
assert_equal(Tag.categories.meta, tag.reload.category)
|
||||
end
|
||||
|
||||
should "work for a new tag" do
|
||||
bur = FactoryBot.create(:bulk_update_request, :script => "category new_tag -> meta")
|
||||
bur.approve!(@admin)
|
||||
|
||||
assert_not_nil(Tag.find_by_name("new_tag"))
|
||||
assert_equal(Tag.categories.meta, Tag.find_by_name("new_tag").category)
|
||||
end
|
||||
end
|
||||
|
||||
context "with an associated forum topic" do
|
||||
|
||||
Reference in New Issue
Block a user