Skip to content

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

ensure test fails if httpx gets an error response

Ivan Kuchina55b508c391b
diff --git a/spec/httpx_spec.rb b/spec/httpx_spec.rb
index 428f8634fb7..3ae8e9494b0 100644
--- a/spec/httpx_spec.rb
+++ b/spec/httpx_spec.rb
@@ -19,10 +19,10 @@ RSpec.describe "HTTPX" do
number_of_requests_made = 0
begin
Timeout.timeout(10) do
- session.post("http://localhost:#{port}")
+ session.post("http://localhost:#{port}").raise_for_status
number_of_requests_made += 1
sleep 4
- session.post("http://localhost:#{port}")
+ session.post("http://localhost:#{port}").raise_for_status
number_of_requests_made += 1
end
ensure