fix tests
This commit is contained in:
@@ -42,9 +42,7 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
||||
should "handle errors gracefully" do
|
||||
@req.stubs(:update_forum_topic_for_approve).raises(RuntimeError.new("blah"))
|
||||
assert_difference("Dmail.count", 1) do
|
||||
CurrentUser.scoped(@admin, "127.0.0.1") do
|
||||
@req.approve!
|
||||
end
|
||||
@req.approve!(@admin.id)
|
||||
end
|
||||
assert_match(/Exception: RuntimeError/, Dmail.last.body)
|
||||
assert_match(/Message: blah/, Dmail.last.body)
|
||||
@@ -56,9 +54,7 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
||||
|
||||
should "update the topic when processed" do
|
||||
assert_difference("ForumPost.count") do
|
||||
CurrentUser.scoped(@admin, "127.0.0.1") do
|
||||
@req.approve!
|
||||
end
|
||||
@req.approve!(@admin.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user