A platform for community discussion. Free, open, simple.
correct plugin specs
Sam7e3543d96fcc
diff --git a/plugins/discourse-narrative-bot/spec/integration/discobot_certificate_spec.rb b/plugins/discourse-narrative-bot/spec/integration/discobot_certificate_spec.rbindex 5e2f58d84ee..c635a357cac 100644--- a/plugins/discourse-narrative-bot/spec/integration/discobot_certificate_spec.rb+++ b/plugins/discourse-narrative-bot/spec/integration/discobot_certificate_spec.rb@@ -28,8 +28,8 @@ describe "Discobot Certificate" do}params.each do |key, _|- expect { get '/discobot/certificate.svg', params: params.except(key) }- .to raise_error(Discourse::InvalidParameters)+ get '/discobot/certificate.svg', params: params.except(key)+ expect(response.status).to eq(400)endendenddiff --git a/plugins/discourse-presence/spec/requests/presence_controller_spec.rb b/plugins/discourse-presence/spec/requests/presence_controller_spec.rbindex 0184718bc6b..8a003a9e4e1 100644--- a/plugins/discourse-presence/spec/requests/presence_controller_spec.rb+++ b/plugins/discourse-presence/spec/requests/presence_controller_spec.rb@@ -23,7 +23,8 @@ describe ::Presence::PresencesController docontext 'when not logged in' doit 'should raise the right error' do- expect { post '/presence/publish.json' }.to raise_error(Discourse::NotLoggedIn)+ post '/presence/publish.json'+ expect(response.status).to eq(403)endenddiff --git a/plugins/poll/spec/integration/poll_endpoints_spec.rb b/plugins/poll/spec/integration/poll_endpoints_spec.rbindex e4c8005a442..8e5e136534d 100644--- a/plugins/poll/spec/integration/poll_endpoints_spec.rb+++ b/plugins/poll/spec/integration/poll_endpoints_spec.rb@@ -57,34 +57,34 @@ describe "DiscoursePoll endpoints" dodescribe 'when post_id is blank' doit 'should raise the right error' do- expect { get "/polls/voters.json", params: { poll_name: DiscoursePoll::DEFAULT_POLL_NAME } }- .to raise_error(ActionController::ParameterMissing)+ get "/polls/voters.json", params: { poll_name: DiscoursePoll::DEFAULT_POLL_NAME }+ expect(response.status).to eq(400)endenddescribe 'when post_id is not valid' doit 'should raise the right error' do- expect do- get "/polls/voters.json", params: {- post_id: -1,- poll_name: DiscoursePoll::DEFAULT_POLL_NAME- }- end.to raise_error(Discourse::InvalidParameters, 'post_id is invalid')+ get "/polls/voters.json", params: {+ post_id: -1,+ poll_name: DiscoursePoll::DEFAULT_POLL_NAME+ }+ expect(response.status).to eq(400)+ expect(response.body).to include('post_id is invalid')endenddescribe 'when poll_name is blank' doit 'should raise the right error' do- expect { get "/polls/voters.json", params: { post_id: post.id } }- .to raise_error(ActionController::ParameterMissing)+ get "/polls/voters.json", params: { post_id: post.id }+ expect(response.status).to eq(400)endenddescribe 'when poll_name is not valid' doit 'should raise the right error' do- expect do- get "/polls/voters.json", params: { post_id: post.id, poll_name: 'wrongpoll' }- end.to raise_error(Discourse::InvalidParameters, 'poll_name is invalid')+ get "/polls/voters.json", params: { post_id: post.id, poll_name: 'wrongpoll' }+ expect(response.status).to eq(400)+ expect(response.body).to include('poll_name is invalid')endend