From bfaa53343a0806b82181073f413d1b811b259ef7 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 25 Jul 2024 10:28:08 -0400 Subject: [PATCH] Improve failure message on pagination matcher (#31146) --- spec/support/matchers/api_pagination.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/support/matchers/api_pagination.rb b/spec/support/matchers/api_pagination.rb index 81e27e44b8..f7d552b242 100644 --- a/spec/support/matchers/api_pagination.rb +++ b/spec/support/matchers/api_pagination.rb @@ -7,7 +7,7 @@ RSpec::Matchers.define :include_pagination_headers do |links| end.all? end - failure_message do |header| - "expected that #{header} would have the same values as #{links}." + failure_message do |response| + "expected that #{response.headers['Link']} would have the same values as #{links}." end end