1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
From: Daniel Leidert <daniel.leidert@debian.org>
Date: Tue, 7 Feb 2023 00:55:55 +0100
Subject: Fix tests with Ruby 3.1
Origin: https://github.com/markets/invisible_captcha/commit/dc181bfcc8c314468457d2939de5ce73cfecc17f
Bug: https://github.com/markets/invisible_captcha/pull/113
Bug-Debian: https://bugs.debian.org/1027077
---
spec/controllers_spec.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec/controllers_spec.rb b/spec/controllers_spec.rb
index e72501d..71ecef9 100644
--- a/spec/controllers_spec.rb
+++ b/spec/controllers_spec.rb
@@ -161,7 +161,7 @@ RSpec.describe InvisibleCaptcha::ControllerExt, type: :controller do
# Skip the `with` matcher for Rails < 5 due to issues comparing arguments passed to / recived by the dummy event handler.
# https://github.com/markets/invisible_captcha/pull/62#issuecomment-552218501
if Rails.version > '5'
- expect(dummy_handler).to receive(:handle_event).once.with(
+ expect(dummy_handler).to receive(:handle_event).once.with({
message: "Invisible Captcha honeypot param 'subtitle' was present.",
remote_ip: '0.0.0.0',
user_agent: 'Rails Testing',
@@ -173,7 +173,7 @@ RSpec.describe InvisibleCaptcha::ControllerExt, type: :controller do
controller: 'topics',
action: 'create'
}
- )
+ })
else
expect(dummy_handler).to receive(:handle_event).once
end
|