@@ -23,7 +23,7 @@ class ActiveStorage::S3DirectUploadsControllerTest < ActionDispatch::Integration
23
23
"my_key_2" : "my_value_2" ,
24
24
"platform" : "my_platform" ,
25
25
"library_ID" : "12345" ,
26
- custom : {
26
+ " custom" : {
27
27
"my_key_3" : "my_value_3"
28
28
}
29
29
}
@@ -38,7 +38,7 @@ class ActiveStorage::S3DirectUploadsControllerTest < ActionDispatch::Integration
38
38
assert_equal "hello.txt" , details [ "filename" ]
39
39
assert_equal 6 , details [ "byte_size" ]
40
40
assert_equal checksum , details [ "checksum" ]
41
- assert_equal metadata , details [ "metadata" ] . transform_keys ( &:to_sym )
41
+ assert_equal metadata , details [ "metadata" ] . deep_transform_keys ( &:to_sym )
42
42
assert_equal "text/plain" , details [ "content_type" ]
43
43
assert_match SERVICE_CONFIGURATIONS [ :s3 ] [ :bucket ] , details [ "direct_upload" ] [ "url" ]
44
44
assert_match ( /s3(-[-a-z0-9]+)?\. (\S +)?amazonaws\. com/ , details [ "direct_upload" ] [ "url" ] )
@@ -71,7 +71,7 @@ class ActiveStorage::GCSDirectUploadsControllerTest < ActionDispatch::Integratio
71
71
"my_key_2" : "my_value_2" ,
72
72
"platform" : "my_platform" ,
73
73
"library_ID" : "12345" ,
74
- custom : {
74
+ " custom" : {
75
75
"my_key_3" : "my_value_3"
76
76
}
77
77
}
@@ -86,7 +86,7 @@ class ActiveStorage::GCSDirectUploadsControllerTest < ActionDispatch::Integratio
86
86
assert_equal "hello.txt" , details [ "filename" ]
87
87
assert_equal 6 , details [ "byte_size" ]
88
88
assert_equal checksum , details [ "checksum" ]
89
- assert_equal metadata , details [ "metadata" ] . transform_keys ( &:to_sym )
89
+ assert_equal metadata , details [ "metadata" ] . deep_transform_keys ( &:to_sym )
90
90
assert_equal "text/plain" , details [ "content_type" ]
91
91
assert_match %r{storage\. googleapis\. com/#{ @config [ :bucket ] } } , details [ "direct_upload" ] [ "url" ]
92
92
assert_equal ( { "Content-MD5" => checksum , "Content-Disposition" => "inline; filename=\" hello.txt\" ; filename*=UTF-8''hello.txt" , "x-goog-meta-my_key_3" => "my_value_3" } , details [ "direct_upload" ] [ "headers" ] )
@@ -130,7 +130,7 @@ class ActiveStorage::AzureStorageDirectUploadsControllerTest < ActionDispatch::I
130
130
assert_equal "hello.txt" , details [ "filename" ]
131
131
assert_equal 6 , details [ "byte_size" ]
132
132
assert_equal checksum , details [ "checksum" ]
133
- assert_equal metadata , details [ "metadata" ] . transform_keys ( &:to_sym )
133
+ assert_equal metadata , details [ "metadata" ] . deep_transform_keys ( &:to_sym )
134
134
assert_equal "text/plain" , details [ "content_type" ]
135
135
assert_match %r{#{ @config [ :storage_account_name ] } \. blob\. core\. windows\. net/#{ @config [ :container ] } } , details [ "direct_upload" ] [ "url" ]
136
136
assert_equal ( { "Content-Type" => "text/plain" , "Content-MD5" => checksum , "x-ms-blob-content-disposition" => "inline; filename=\" hello.txt\" ; filename*=UTF-8''hello.txt" , "x-ms-blob-type" => "BlockBlob" } , details [ "direct_upload" ] [ "headers" ] )
@@ -162,7 +162,7 @@ class ActiveStorage::DiskDirectUploadsControllerTest < ActionDispatch::Integrati
162
162
assert_equal "hello.txt" , details [ "filename" ]
163
163
assert_equal 6 , details [ "byte_size" ]
164
164
assert_equal checksum , details [ "checksum" ]
165
- assert_equal metadata , details [ "metadata" ] . transform_keys ( &:to_sym )
165
+ assert_equal metadata , details [ "metadata" ] . deep_transform_keys ( &:to_sym )
166
166
assert_equal "text/plain" , details [ "content_type" ]
167
167
assert_match ( /rails\/ active_storage\/ disk/ , details [ "direct_upload" ] [ "url" ] )
168
168
assert_equal ( { "Content-Type" => "text/plain" } , details [ "direct_upload" ] [ "headers" ] )
@@ -212,7 +212,7 @@ class ActiveStorage::DiskDirectUploadsControllerTest < ActionDispatch::Integrati
212
212
assert_equal "hello.txt" , details [ "filename" ]
213
213
assert_equal 6 , details [ "byte_size" ]
214
214
assert_equal checksum , details [ "checksum" ]
215
- assert_equal metadata , details [ "metadata" ] . transform_keys ( &:to_sym )
215
+ assert_equal metadata , details [ "metadata" ] . deep_transform_keys ( &:to_sym )
216
216
assert_equal "text/plain" , details [ "content_type" ]
217
217
assert_match ( /rails\/ active_storage\/ disk/ , details [ "direct_upload" ] [ "url" ] )
218
218
assert_equal ( { "Content-Type" => "text/plain" } , details [ "direct_upload" ] [ "headers" ] )
0 commit comments