OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Change Shares controller spec to expect a not found status instead of an error to be raised
Dombi Attilae173da05c3bb
diff --git a/spec/controllers/shares_controller_spec.rb b/spec/controllers/shares_controller_spec.rbindex cad2d376502..2ac3a4dc8c8 100644--- a/spec/controllers/shares_controller_spec.rb+++ b/spec/controllers/shares_controller_spec.rb@@ -57,8 +57,9 @@ RSpec.describe SharesController domock_permissions_for(user, &:forbid_everything)end- it "raises a RecordNotFound error" do- expect { make_request }.to raise_error(ActiveRecord::RecordNotFound)+ it "returns a 404 status" do+ make_request+ expect(response).to have_http_status(:not_found)endend@@ -87,8 +88,9 @@ RSpec.describe SharesController domock_permissions_for(user, &:forbid_everything)end- it "raises a RecordNotFound error" do- expect { make_request }.to raise_error(ActiveRecord::RecordNotFound)+ it "returns a 404 status" do+ make_request+ expect(response).to have_http_status(:not_found)endend