summaryrefslogtreecommitdiff
path: root/qa/qa/support/api.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/support/api.rb')
-rw-r--r--qa/qa/support/api.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/qa/qa/support/api.rb b/qa/qa/support/api.rb
index ea19d9ef332..0081b1c1d46 100644
--- a/qa/qa/support/api.rb
+++ b/qa/qa/support/api.rb
@@ -144,7 +144,7 @@ module QA
end
def with_paginated_response_body(url, attempts: 0)
- not_ok_error = lambda do |resp|
+ not_ok_error = ->(resp) do
raise "Failed to GET #{masked_url(url)} - (#{resp.code}): `#{resp}`."
end
@@ -164,7 +164,7 @@ module QA
yield parse_body(response)
- break if next_page.empty?
+ break if next_page.blank?
url = url.match?(/&page=\d+/) ? url.gsub(/&page=\d+/, "&page=#{next_page}") : "#{url}&page=#{next_page}"
end