test/integration/catcher_test.rb in airbrake-3.1.16 vs test/integration/catcher_test.rb in airbrake-3.1.17
- old
+ new
@@ -129,10 +129,11 @@
end
class ActionControllerCatcherTest < ActionDispatch::IntegrationTest
include DefinesConstants
+ include TestHelpers
def setup
super
reset_config
Airbrake.sender = CollectingSender.new
@@ -262,9 +263,16 @@
end
def test_not_deliver_notices_from_exceptions_in_development_environments
Airbrake.configuration.development_environments = ["test"]
Airbrake.configuration.environment_name = "test"
+ @app = AirbrakeTestController.action(:boom)
+ get '/'
+ assert_caught_and_not_sent
+ end
+
+ def test_not_deliver_notices_from_exceptions_with_no_api_key
+ Airbrake.configuration.api_key = nil
@app = AirbrakeTestController.action(:boom)
get '/'
assert_caught_and_not_sent
end