BURs: don't update OP when approving BUR.
When approving or rejecting a BUR, don't edit the OP forum post to add an EDIT: line stating the request has been approved. Instead just let the embedded BUR state who it was approved by, and post a reply saying that the request has been approved.
This commit is contained in:
@@ -19,7 +19,7 @@ class BulkUpdateRequestPrunerTest < ActiveSupport::TestCase
|
||||
|
||||
BulkUpdateRequestPruner.reject_expired
|
||||
assert_equal("rejected", bur.reload.status)
|
||||
assert_match(/rejected because it was not approved within 60 days/, bur.forum_post.body)
|
||||
assert_match(/rejected because it was not approved within 60 days/, ForumPost.second.body)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -422,10 +422,6 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
||||
@ti = TagImplication.where(:antecedent_name => "bar", :consequent_name => "baz").first
|
||||
end
|
||||
|
||||
should "reference the approver in the automated message" do
|
||||
assert_match(Regexp.compile(@admin.name), @bur.forum_post.body)
|
||||
end
|
||||
|
||||
should "set the BUR approver" do
|
||||
assert_equal(@admin.id, @bur.approver.id)
|
||||
end
|
||||
@@ -481,29 +477,6 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
||||
assert_equal("pending", @req.status)
|
||||
end
|
||||
|
||||
should "update the topic when processed" do
|
||||
assert_difference("ForumPost.count") do
|
||||
@req.approve!(@admin)
|
||||
end
|
||||
|
||||
assert_match(/approved/, @post.reload.body)
|
||||
end
|
||||
|
||||
should "update the topic when rejected" do
|
||||
@req.approver_id = @admin.id
|
||||
|
||||
assert_difference("ForumPost.count") do
|
||||
@req.reject!(@admin)
|
||||
end
|
||||
|
||||
assert_match(/rejected/, @post.reload.body)
|
||||
end
|
||||
|
||||
should "reference the rejector in the automated message" do
|
||||
@req.reject!(@admin)
|
||||
assert_match(Regexp.compile(@admin.name), @req.forum_post.body)
|
||||
end
|
||||
|
||||
should "not send @mention dmails to the approver" do
|
||||
assert_no_difference("Dmail.count") do
|
||||
@req.approve!(@admin)
|
||||
|
||||
Reference in New Issue
Block a user