Skip to content

Commit 6cae821

Browse files
committed
rate limit expectations on error,429
1 parent be05ee9 commit 6cae821

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/core/middleware/response/zendesk_request_event_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
)
4040
expect(instrumentation).to receive(:instrument).with(
4141
"zendesk.rate_limit",
42-
hash_including(endpoint: "/api/v2/tickets", status: 200)
42+
hash_including(endpoint: "/api/v2/tickets", status: 200, threshold: 10, limit: 100, reset: 1234567890)
4343
)
4444
middleware.call(env).on_complete { |_response_env| 1 }
4545
end
@@ -53,7 +53,7 @@
5353
"zendesk.request",
5454
hash_including(:duration, endpoint: "/api/v2/tickets", method: :get, status: 500)
5555
)
56-
expect(instrumentation).not_to receive(:instrument).with("zendesk.rate_limit", anything)
56+
expect(instrumentation).not_to receive(:instrument).with("zendesk.rate_limit", hash_including(endpoint: "/api/v2/tickets", status: 200, threshold: 10, limit: 100, reset: 1234567890))
5757
middleware.call(env).on_complete { |_response_env| 1 }
5858
end
5959
end

0 commit comments

Comments
 (0)