diff --git a/spec/fixtures/minimal_test_notice.xml b/spec/fixtures/minimal_test_notice.xml new file mode 100644 index 0000000..be523a5 --- /dev/null +++ b/spec/fixtures/minimal_test_notice.xml @@ -0,0 +1,17 @@ + + + APIKEY + + MINIMAL + + + OneClass + Some message + + + + + + development + + diff --git a/spec/models/error_report_spec.rb b/spec/models/error_report_spec.rb index 98cf420..bffe33b 100644 --- a/spec/models/error_report_spec.rb +++ b/spec/models/error_report_spec.rb @@ -65,6 +65,20 @@ describe ErrorReport do }.by(1) end + context "with a minimal notice" do + let(:xml){ + Rails.root.join('spec','fixtures','minimal_test_notice.xml').read + } + + it 'save a notice' do + expect { + error_report.generate_notice! + }.to change { + app.reload.problems.count + }.by(1) + end + end + context "with notice generate by Airbrake gem" do let(:xml) { Airbrake::Notice.new( :exception => Exception.new, -- libgit2 0.21.2