diff --git a/spec/requests/notices_controller_spec.rb b/spec/requests/notices_controller_spec.rb index 1f38349..8a7ac0f 100644 --- a/spec/requests/notices_controller_spec.rb +++ b/spec/requests/notices_controller_spec.rb @@ -45,6 +45,19 @@ describe "Notices management" do end + # the JS notifier allows for both GET and POST requests + context "with GET request" do + let(:xml) { Rails.root.join('spec','fixtures','hoptoad_test_notice.xml').read } + it 'save a new notice' do + expect { + get '/notifier_api/v2/notices', :data => xml + expect(response).to be_success + }.to change { + errbit_app.problems.count + }.by(1) + end + end + end end -- libgit2 0.21.2