Skip to content

Commit 923eb4e

Browse files
committed
Add unit tests
1 parent e5102f0 commit 923eb4e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

sentry-ruby/spec/sentry/rack/capture_exceptions_spec.rb

+14
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,20 @@ def will_be_sampled_by_sdk
297297
verify_transaction_attributes(transaction)
298298
verify_transaction_inherits_external_transaction(transaction, external_transaction)
299299
end
300+
301+
context "performing an HTTP OPTIONS request" do
302+
let(:additional_headers) do
303+
{ method: "OPTIONS" }
304+
end
305+
306+
it "doesn't sample transaction" do
307+
wont_be_sampled_by_sdk
308+
309+
stack.call(env)
310+
311+
expect(transaction).to be_nil
312+
end
313+
end
300314
end
301315

302316
context "with unsampled trace" do

0 commit comments

Comments
 (0)