spec/lib/appsignal/integrations/grape_spec.rb in appsignal-2.1.2 vs spec/lib/appsignal/integrations/grape_spec.rb in appsignal-2.2.0.beta.1
- old
+ new
@@ -62,11 +62,11 @@
expect(api_endpoint).to receive(:call).with(env)
end
it "sets metadata" do
expect(transaction).to receive(:set_http_or_background_queue_start)
- expect(transaction).to receive(:set_action).with("POST::GrapeExample::Api#/ping")
+ expect(transaction).to receive(:set_action_if_nil).with("POST::GrapeExample::Api#/ping")
expect(transaction).to receive(:set_metadata).with("path", "/ping")
expect(transaction).to receive(:set_metadata).with("method", "POST")
end
after { middleware.call(env) }
@@ -82,11 +82,11 @@
end
end
it "sets metadata" do
expect(transaction).to receive(:set_http_or_background_queue_start)
- expect(transaction).to receive(:set_action).with("POST::GrapeExample::Api#/ping")
+ expect(transaction).to receive(:set_action_if_nil).with("POST::GrapeExample::Api#/ping")
expect(transaction).to receive(:set_metadata).with("path", "/ping")
expect(transaction).to receive(:set_metadata).with("method", "POST")
end
it "sets the error" do
@@ -141,11 +141,11 @@
"REQUEST_METHOD" => "GET",
:path => ""
end
it "sets non-unique route_param path" do
- expect(transaction).to receive(:set_action).with("GET::GrapeExample::Api#/users/:id/")
+ expect(transaction).to receive(:set_action_if_nil).with("GET::GrapeExample::Api#/users/:id/")
expect(transaction).to receive(:set_metadata).with("path", "/users/:id/")
expect(transaction).to receive(:set_metadata).with("method", "GET")
end
after { middleware.call(env) }
@@ -165,11 +165,11 @@
end
end
end
it "sets namespaced path" do
- expect(transaction).to receive(:set_action).with("POST::GrapeExample::Api#/v1/beta/ping")
+ expect(transaction).to receive(:set_action_if_nil).with("POST::GrapeExample::Api#/v1/beta/ping")
expect(transaction).to receive(:set_metadata).with("path", "/v1/beta/ping")
expect(transaction).to receive(:set_metadata).with("method", "POST")
end
end
@@ -187,11 +187,11 @@
end
end
end
it "sets namespaced path" do
- expect(transaction).to receive(:set_action).with("POST::GrapeExample::Api#/v1/beta/ping")
+ expect(transaction).to receive(:set_action_if_nil).with("POST::GrapeExample::Api#/v1/beta/ping")
expect(transaction).to receive(:set_metadata).with("path", "/v1/beta/ping")
expect(transaction).to receive(:set_metadata).with("method", "POST")
end
end
@@ -208,10 +208,10 @@
end
end
end
it "sets namespaced path" do
- expect(transaction).to receive(:set_action).with("POST::GrapeExample::Api#/v1/beta/ping")
+ expect(transaction).to receive(:set_action_if_nil).with("POST::GrapeExample::Api#/v1/beta/ping")
expect(transaction).to receive(:set_metadata).with("path", "/v1/beta/ping")
expect(transaction).to receive(:set_metadata).with("method", "POST")
end
end
end