Skip to content

Commit

Permalink
Fix forward patch payload test (#884)
Browse files Browse the repository at this point in the history
(cherry picked from commit a13d7dd)
  • Loading branch information
chris1984 authored and Odilhao committed Nov 12, 2024
1 parent 74656e4 commit 2e085e4
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ class CloudRequestForwarderTest < ActiveSupport::TestCase
end

test 'should forward patch payload' do
params = { 'pumpkin' => 'pie' }
post_data = 'Random PATCH data'
req = ActionDispatch::Request.new(
'REQUEST_URI' => '/foo/bar?baz=awesome',
'REQUEST_METHOD' => 'PATCH',
'rack.input' => ::Puma::NullIO.new,
'RAW_POST_DATA' => 'Random PATCH data',
"action_dispatch.request.path_parameters" => { :format => "json" },
"action_dispatch.request.request_parameters" => { 'vegetables' => params }
'RAW_POST_DATA' => post_data,
"action_dispatch.request.path_parameters" => { :format => "json" }
)
assert_equal params.to_json, @forwarder.prepare_forward_payload(req, 'vegetables')
assert_equal post_data, @forwarder.prepare_forward_payload(req, 'Random PATCH data')
end

test 'should forward file with metadata' do
Expand Down

0 comments on commit 2e085e4

Please sign in to comment.