From 15c375aa1f3291711dcdf3f5dc2c30cf170cc838 Mon Sep 17 00:00:00 2001 From: Tanna McClure Date: Wed, 2 Nov 2022 17:08:47 -0700 Subject: [PATCH] add test for missing category in NewRelic::Agent::Tracer.in_transaction --- test/new_relic/agent/tracer_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/new_relic/agent/tracer_test.rb b/test/new_relic/agent/tracer_test.rb index 4ef06580bc..23dd78f07f 100644 --- a/test/new_relic/agent/tracer_test.rb +++ b/test/new_relic/agent/tracer_test.rb @@ -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")