BURs: remove dead error handling code.
This is a 'this should never happen' error. This error is only raised if we add a new bulk update request type and forget to handle it somewhere.
This commit is contained in:
@@ -72,11 +72,6 @@ class BulkUpdateRequest < ApplicationRecord
|
||||
forum_updater.update("The #{bulk_update_request_link} (forum ##{forum_post.id}) has been approved by @#{approver.name}.")
|
||||
end
|
||||
end
|
||||
rescue BulkUpdateRequestProcessor::Error => x
|
||||
self.approver = approver
|
||||
CurrentUser.scoped(approver) do
|
||||
forum_updater.update("The #{bulk_update_request_link} (forum ##{forum_post.id}) has failed: #{x}")
|
||||
end
|
||||
end
|
||||
|
||||
def create_forum_topic
|
||||
|
||||
@@ -458,10 +458,6 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
||||
|
||||
should "gracefully handle validation errors during approval" do
|
||||
@req.stubs(:update!).raises(BulkUpdateRequestProcessor::Error.new("blah"))
|
||||
assert_difference("ForumPost.count", 1) do
|
||||
@req.approve!(@admin)
|
||||
end
|
||||
|
||||
assert_equal("pending", @req.reload.status)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user