Skip to content

Commit

Permalink
add test for missing category in
Browse files Browse the repository at this point in the history
NewRelic::Agent::Tracer.in_transaction
  • Loading branch information
tannalynn committed Nov 3, 2022
1 parent 72d497a commit 15c375a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/new_relic/agent/tracer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ def test_in_transaction
assert_metrics_recorded(['test'])
end

def test_in_transaction_missing_category
assert_raises ArgumentError do
NewRelic::Agent::Tracer.in_transaction(name: 'test') do
# No-op
end
end
end

def test_in_transaction_with_early_failure
yielded = false
NewRelic::Agent::Transaction.any_instance.stubs(:start).raises("Boom")
Expand Down

0 comments on commit 15c375a

Please sign in to comment.