-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't add custom fields before controller #113
base: main
Are you sure you want to change the base?
Conversation
…fields are added when an exception is thrown
Fix for issue #114 |
payload[:status] = response.status | ||
result | ||
ensure | ||
if self.respond_to?(:logtasher_add_custom_fields_to_payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it should be :logstasher_add_custom_fields_to_payload
instead of :logtasher_add_custom_fields_to_payload
@@ -65,5 +65,44 @@ def subject.index(*args) | |||
end | |||
end | |||
end | |||
|
|||
context "payload has custom fields defined" do | |||
before :each do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:each
part is redundant. before { some_code }
is same as before(:each) { some_code }
. This also applies to after
blocks
d37188e
to
9480e28
Compare
aa5da57
to
f28e910
Compare
Also ensure custom fields are added when an exception is thrown from the controller