aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/service
diff options
context:
space:
mode:
authortommy <kazu9su@gmail.com>2018-03-01 08:59:00 +0900
committertommy <kazu9su@gmail.com>2018-03-01 08:59:00 +0900
commita21d11ce80abfbd9d58ce685ff1a5139d732d532 (patch)
treeceaa9d80ba7c6f906cdd3fd591a5e8b1839c13bf /activestorage/test/service
parentc9fa561b2e8dd6bfe31c1850a47e2f17cac94aa6 (diff)
downloadrails-a21d11ce80abfbd9d58ce685ff1a5139d732d532.tar.gz
rails-a21d11ce80abfbd9d58ce685ff1a5139d732d532.tar.bz2
rails-a21d11ce80abfbd9d58ce685ff1a5139d732d532.zip
Add ActiveStorage::Service::DiskService#url_for_direct_upload test
Diffstat (limited to 'activestorage/test/service')
-rw-r--r--activestorage/test/service/disk_service_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activestorage/test/service/disk_service_test.rb b/activestorage/test/service/disk_service_test.rb
index 4a6361b920..95b535ebc8 100644
--- a/activestorage/test/service/disk_service_test.rb
+++ b/activestorage/test/service/disk_service_test.rb
@@ -11,4 +11,8 @@ class ActiveStorage::Service::DiskServiceTest < ActiveSupport::TestCase
assert_match(/rails\/active_storage\/disk\/.*\/avatar\.png\?content_type=image%2Fpng&disposition=inline/,
@service.url(FIXTURE_KEY, expires_in: 5.minutes, disposition: :inline, filename: ActiveStorage::Filename.new("avatar.png"), content_type: "image/png"))
end
+
+ test "headers_for_direct_upload generation" do
+ assert_equal({ "Content-Type" => "application/json" }, @service.headers_for_direct_upload(FIXTURE_KEY, content_type: "application/json"))
+ end
end