Skip to content

Commit

Permalink
Remove double-splat from ActionsHandler spec
Browse files Browse the repository at this point in the history
These examples have to be rewritten with Hash#merge, since older
versions of Ruby do not support double-splat operator.
  • Loading branch information
y9v committed Jan 17, 2025
1 parent 06f2060 commit 4d47360
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/datadog/appsec/actions_handler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
expect(described_class).not_to receive(:block_request)

catch(Datadog::AppSec::Ext::INTERRUPT) do
described_class.handle(**block_request_action, **redirect_request_action)
described_class.handle(block_request_action.merge(redirect_request_action))
end
end

Expand All @@ -75,7 +75,7 @@
receive(:generate_schema).with(generate_schema_action['generate_schema']).and_call_original
)

described_class.handle(**generate_stack_action, **generate_schema_action)
described_class.handle(generate_stack_action.merge(generate_schema_action))
end

it 'calls both generate_stack and block_request when both are present' do
Expand All @@ -87,7 +87,7 @@
)

catch(Datadog::AppSec::Ext::INTERRUPT) do
described_class.handle(**generate_stack_action, **block_request_action)
described_class.handle(generate_stack_action.merge(block_request_action))
end
end

Expand All @@ -100,7 +100,7 @@
)

catch(Datadog::AppSec::Ext::INTERRUPT) do
described_class.handle(**generate_stack_action, **redirect_request_action)
described_class.handle(generate_stack_action.merge(redirect_request_action))
end
end
end
Expand Down

0 comments on commit 4d47360

Please sign in to comment.