spec/notification_spec.rb in bugsnag-4.0.2 vs spec/notification_spec.rb in bugsnag-4.1.0

- old
+ new

@@ -333,9 +333,20 @@ event = get_event_from_payload(payload) expect(event["severity"]).to eq("warning") } end + it "lets you override severity using block syntax" do + Bugsnag.notify(BugsnagTestException.new("It crashed")) do |notification| + notification.severity = "info" + end + + expect(Bugsnag).to have_sent_notification{ |payload| + event = get_event_from_payload(payload) + expect(event["severity"]).to eq("info") + } + end + it "autonotifies errors" do Bugsnag.auto_notify(BugsnagTestException.new("It crashed")) expect(Bugsnag).to have_sent_notification{ |payload| event = get_event_from_payload(payload)