test/frameworks/cuba_test.rb in instana-1.11.8-java vs test/frameworks/cuba_test.rb in instana-1.12.0
- old
+ new
@@ -1,6 +1,5 @@
-
if defined?(::Cuba)
require 'test_helper'
require File.expand_path(File.dirname(__FILE__) + '/../apps/cuba')
require 'rack/test'
@@ -37,8 +36,22 @@
assert first_span[:data][:http].key?(:status)
assert_equal 200, first_span[:data][:http][:status]
assert first_span[:data][:http].key?(:host)
assert_equal "example.org", first_span[:data][:http][:host]
+ end
+
+ def test_path_template
+ clear_all!
+
+ r = get '/greet/instana'
+ assert last_response.ok?
+
+ spans = ::Instana.processor.queued_spans
+ assert_equal 1, spans.count
+
+ first_span = spans.first
+ assert_equal :rack, first_span[:n]
+ assert_equal '/greet/{name}', first_span[:data][:http][:path_tpl]
end
end
end