BulkUpdateRequest#approve!: don't swallow exceptions.

Rescue `AliasAndImplicationImporter::Error` instead of `Exception`.
This commit is contained in:
evazion
2018-02-24 14:37:02 -06:00
parent 3fefb73e90
commit 2b8767d7f4
3 changed files with 12 additions and 11 deletions

View File

@@ -113,7 +113,7 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
end
should "handle errors gracefully" do
@req.stubs(:update).raises(RuntimeError.new("blah"))
@req.stubs(:update).raises(AliasAndImplicationImporter::Error.new("blah"))
assert_difference("ForumPost.count", 1) do
@req.approve!(@admin)
end