features/rails.feature in airbrake-3.1.2 vs features/rails.feature in airbrake-3.1.3
- old
+ new
@@ -92,10 +92,11 @@
raise RuntimeError, "some message"
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value"
Then I should receive a Airbrake notification
+ Then I should see "test"
Scenario: The gem should not be considered a framework gem
When I configure the Airbrake shim
And I configure my application to require the "airbrake" gem
And I run the airbrake generator with "-k myapikey"
@@ -152,10 +153,12 @@
raise RuntimeError, "some message"
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value"
Then I should receive a Airbrake notification
+ Then I should not see "red23"
+ And I should see "FILTERED"
Scenario: Filtering session in a controller
When I configure the Airbrake shim
And I configure usage of Airbrake
When I configure the notifier to use the following configuration lines:
@@ -169,10 +172,12 @@
raise RuntimeError, "some message"
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value"
Then I should receive a Airbrake notification
+ Then I should not see "blue42"
+ And I should see "FILTERED"
Scenario: Filtering session and params based on Rails parameter filters
When I configure the Airbrake shim
And I configure usage of Airbrake
And I configure the application to filter parameter "secret"
@@ -183,10 +188,13 @@
raise RuntimeError, "some message"
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value"
Then I should receive a Airbrake notification
+ And I should not see "red23"
+ And I should not see "blue42"
+ And I should see "FILTERED"
Scenario: Notify airbrake within the controller
When I configure the Airbrake shim
And I configure usage of Airbrake
And I define a response for "TestController#index":
@@ -196,16 +204,69 @@
render :nothing => true
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value"
Then I should receive a Airbrake notification
+ And I should see "test"
- Scenario: Reporting 404s
+ Scenario: Reporting 404s should be disabled by default
When I configure the Airbrake shim
And I configure usage of Airbrake
- And I configure the notifier to use the following configuration lines:
- """
- config.ignore_only = []
- """
And I perform a request to "http://example.com:123/this/route/does/not/exist"
Then I should see "The page you were looking for doesn't exist."
+ And I should not receive a Airbrake notification
+
+ Scenario: Reporting 404s should work when configured properly
+ When I configure the Airbrake shim
+ And I configure usage of Airbrake
+ When I configure the notifier to use the following configuration lines:
+ """
+ config.ignore_only = []
+ """
+ And I perform a request to "http://example.com:123/this/route/does/not/exist"
+ Then I should see "The page you were looking for doesn't exist."
And I should receive a Airbrake notification
+
+ Scenario: reporting over SSL with utf8 check should work
+ Given PENDING I fix this one
+ When I configure the Airbrake shim
+ And I configure usage of Airbrake
+ When I configure the notifier to use the following configuration lines:
+ """
+ config.secure = true
+ """
+ And I define a response for "TestController#index":
+ """
+ raise RuntimeError, "some message"
+ """
+ And I route "/test/index" to "test#index"
+ And I perform a request to "http://example.com:123/test/index?utf8=✓"
+ Then I should receive a Airbrake notification
+
+ Scenario: It should also send the user details
+ When I configure the Airbrake shim
+ And I configure usage of Airbrake
+ And I define a response for "TestController#index":
+ """
+ raise RuntimeError, "some message"
+ """
+ And I route "/test/index" to "test#index"
+ And I have set up authentication system in my app that uses "current_user"
+ And I perform a request to "http://example.com:123/test/index"
+ Then I should receive a Airbrake notification
+ And the Airbrake notification should contain user details
+ When I have set up authentication system in my app that uses "current_member"
+ And I perform a request to "http://example.com:123/test/index"
+ Then I should receive a Airbrake notification
+ And the Airbrake notification should contain user details
+
+ Scenario: It should log the notice when failure happens
+ When Airbrake server is not responding
+ And I configure usage of Airbrake
+ And I define a response for "TestController#index":
+ """
+ raise RuntimeError, "some message"
+ """
+ And I route "/test/index" to "test#index"
+ And I perform a request to "http://example.com:123/test/index?param=value"
+ Then I should see "Notice details:"
+ And I should see "some message"