aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test
diff options
context:
space:
mode:
authorJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-30 08:43:37 -0800
committerJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-30 08:43:37 -0800
commit241b5f1cebb17449f31e4170671ef70866605f8b (patch)
treee939f4aa85f321fd40090d5b5a31ecd25907135d /activestorage/test
parent3429ab14a6f2380f4bd924fe9d9ad2eb967ae62b (diff)
parentf7e3c686685fb89e67293440d24356f93fa34847 (diff)
downloadrails-241b5f1cebb17449f31e4170671ef70866605f8b.tar.gz
rails-241b5f1cebb17449f31e4170671ef70866605f8b.tar.bz2
rails-241b5f1cebb17449f31e4170671ef70866605f8b.zip
Merge branch 'master' into activestorage-guide
Diffstat (limited to 'activestorage/test')
-rw-r--r--activestorage/test/service/configurations.example.yml2
-rw-r--r--activestorage/test/service/gcs_service_test.rb9
2 files changed, 3 insertions, 8 deletions
diff --git a/activestorage/test/service/configurations.example.yml b/activestorage/test/service/configurations.example.yml
index 56ed37be5d..43cc013bc8 100644
--- a/activestorage/test/service/configurations.example.yml
+++ b/activestorage/test/service/configurations.example.yml
@@ -7,7 +7,7 @@
#
# gcs:
# service: GCS
-# keyfile: {
+# credentials: {
# type: "service_account",
# project_id: "",
# private_key_id: "",
diff --git a/activestorage/test/service/gcs_service_test.rb b/activestorage/test/service/gcs_service_test.rb
index 5566c664a9..1860149da9 100644
--- a/activestorage/test/service/gcs_service_test.rb
+++ b/activestorage/test/service/gcs_service_test.rb
@@ -32,13 +32,8 @@ if SERVICE_CONFIGURATIONS[:gcs]
end
test "signed URL generation" do
- freeze_time do
- url = SERVICE.bucket.signed_url(FIXTURE_KEY, expires: 120) +
- "&response-content-disposition=inline%3B+filename%3D%22test.txt%22%3B+filename%2A%3DUTF-8%27%27test.txt" +
- "&response-content-type=text%2Fplain"
-
- assert_equal url, @service.url(FIXTURE_KEY, expires_in: 2.minutes, disposition: :inline, filename: ActiveStorage::Filename.new("test.txt"), content_type: "text/plain")
- end
+ assert_match(/storage\.googleapis\.com\/.*response-content-disposition=inline.*test\.txt.*response-content-type=text%2Fplain/,
+ @service.url(FIXTURE_KEY, expires_in: 2.minutes, disposition: :inline, filename: ActiveStorage::Filename.new("test.txt"), content_type: "text/plain"))
end
end
else