Skip to content

Commit d388b92

Browse files
committed
Test patch with dasherized keys
1 parent 45b75a4 commit d388b92

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

test/integration/requests/request_test.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,4 +530,20 @@ def test_post_formatted_keys_wrong_format
530530

531531
assert_equal 400, status
532532
end
533+
534+
def test_patch_formatted_dasherized
535+
JSONAPI.configuration.route_format = :dasherized_route
536+
JSONAPI.configuration.json_key_format = :dasherized_key
537+
patch '/api/v6/purchase-orders/1',
538+
{
539+
'data' => {
540+
'id' => '1',
541+
'delivery-name' => 'ASDFG Corp',
542+
'type' => 'purchase-orders'
543+
}
544+
}.to_json, "CONTENT_TYPE" => JSONAPI::MEDIA_TYPE
545+
546+
assert_equal 201, status
547+
end
548+
533549
end

0 commit comments

Comments
 (0)