debian-mirror-gitlab/spec/support/helpers/sentry_client_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
352 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
# frozen_string_literal: true
module SentryClientHelpers
private
2020-03-13 15:44:24 +05:30
def stub_sentry_request(url, http_method = :get, body: {}, status: 200, headers: {})
stub_request(http_method, url)
2020-01-01 13:55:28 +05:30
.to_return(
status: status,
headers: { 'Content-Type' => 'application/json' }.merge(headers),
body: body.to_json
)
end
end