summaryrefslogtreecommitdiff
path: root/spec/support/helpers/sentry_client_helpers.rb
blob: 7476b5fb24961439bb82786357cf7b22bceb09c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module SentryClientHelpers
  private

  def stub_sentry_request(url, body: {}, status: 200, headers: {})
    stub_request(:get, url)
      .to_return(
        status: status,
        headers: { 'Content-Type' => 'application/json' }.merge(headers),
        body: body.to_json
      )
  end
end