Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
natikgadzhi committed Nov 27, 2023
1 parent e5102f0 commit 923eb4e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sentry-ruby/spec/sentry/rack/capture_exceptions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,20 @@ def will_be_sampled_by_sdk
verify_transaction_attributes(transaction)
verify_transaction_inherits_external_transaction(transaction, external_transaction)
end

context "performing an HTTP OPTIONS request" do
let(:additional_headers) do
{ method: "OPTIONS" }
end

it "doesn't sample transaction" do
wont_be_sampled_by_sdk

stack.call(env)

expect(transaction).to be_nil
end
end
end

context "with unsampled trace" do
Expand Down

0 comments on commit 923eb4e

Please sign in to comment.