aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2017-08-20 18:45:39 -0400
committerGeorge Claghorn <george.claghorn@gmail.com>2017-08-20 18:45:39 -0400
commit332049d1161b9336ff308a06adf318df20c07d4e (patch)
tree72f73b43603e3a954825312edc608551016b97c1 /activestorage
parente9468e3971b9c38dd6584fcaa25b3acc6d2ab630 (diff)
downloadrails-332049d1161b9336ff308a06adf318df20c07d4e.tar.gz
rails-332049d1161b9336ff308a06adf318df20c07d4e.tar.bz2
rails-332049d1161b9336ff308a06adf318df20c07d4e.zip
Fix tests
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/test/service/azure_storage_service_test.rb2
-rw-r--r--activestorage/test/service/disk_service_test.rb2
-rw-r--r--activestorage/test/service/gcs_service_test.rb2
-rw-r--r--activestorage/test/service/s3_service_test.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/activestorage/test/service/azure_storage_service_test.rb b/activestorage/test/service/azure_storage_service_test.rb
index dac154cf11..bbd8d0a996 100644
--- a/activestorage/test/service/azure_storage_service_test.rb
+++ b/activestorage/test/service/azure_storage_service_test.rb
@@ -11,7 +11,7 @@ if SERVICE_CONFIGURATIONS[:azure]
test "signed URL generation" do
url = @service.url(FIXTURE_KEY, expires_in: 5.minutes,
- disposition: :inline, filename: "avatar.png", content_type: "image/png")
+ disposition: "inline; filename=\"avatar.png\"", filename: "avatar.png", content_type: "image/png")
assert_match(/(\S+)&rsct=image%2Fpng&rscd=inline%3B\+filename%3D%22avatar.png/, url)
assert_match SERVICE_CONFIGURATIONS[:azure][:container], url
diff --git a/activestorage/test/service/disk_service_test.rb b/activestorage/test/service/disk_service_test.rb
index 835a3a2971..f57e44536a 100644
--- a/activestorage/test/service/disk_service_test.rb
+++ b/activestorage/test/service/disk_service_test.rb
@@ -9,6 +9,6 @@ class ActiveStorage::Service::DiskServiceTest < ActiveSupport::TestCase
test "url generation" do
assert_match(/rails\/active_storage\/disk\/.*\/avatar\.png\?.+disposition=inline/,
- @service.url(FIXTURE_KEY, expires_in: 5.minutes, disposition: :inline, filename: "avatar.png", content_type: "image/png"))
+ @service.url(FIXTURE_KEY, expires_in: 5.minutes, disposition: "inline; filename=\"avatar.png\"", filename: "avatar.png", content_type: "image/png"))
end
end
diff --git a/activestorage/test/service/gcs_service_test.rb b/activestorage/test/service/gcs_service_test.rb
index 5f53f61baf..f664cee90b 100644
--- a/activestorage/test/service/gcs_service_test.rb
+++ b/activestorage/test/service/gcs_service_test.rb
@@ -37,7 +37,7 @@ if SERVICE_CONFIGURATIONS[:gcs]
"&response-content-disposition=inline%3B+filename%3D%22test.txt%22" +
"&response-content-type=text%2Fplain"
- assert_equal url, @service.url(FIXTURE_KEY, expires_in: 2.minutes, disposition: :inline, filename: "test.txt", content_type: "text/plain")
+ assert_equal url, @service.url(FIXTURE_KEY, expires_in: 2.minutes, disposition: "inline; filename=\"test.txt\"", filename: "test.txt", content_type: "text/plain")
end
end
end
diff --git a/activestorage/test/service/s3_service_test.rb b/activestorage/test/service/s3_service_test.rb
index 98f520741d..c07d6396b1 100644
--- a/activestorage/test/service/s3_service_test.rb
+++ b/activestorage/test/service/s3_service_test.rb
@@ -33,7 +33,7 @@ if SERVICE_CONFIGURATIONS[:s3] && SERVICE_CONFIGURATIONS[:s3][:access_key_id].pr
test "signed URL generation" do
url = @service.url(FIXTURE_KEY, expires_in: 5.minutes,
- disposition: :inline, filename: "avatar.png", content_type: "image/png")
+ disposition: "inline; filename=\"avatar.png\"", filename: "avatar.png", content_type: "image/png")
assert_match(/s3\.(\S+)?amazonaws.com.*response-content-disposition=inline.*avatar\.png.*response-content-type=image%2Fpng/, url)
assert_match SERVICE_CONFIGURATIONS[:s3][:bucket], url