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:
evazion
2020-12-03 15:52:04 -06:00
parent 35d26e92e9
commit 8a52d8ed5f
2 changed files with 0 additions and 9 deletions

View File

@@ -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

View File

@@ -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