aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/site/gcs_site_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/site/gcs_site_test.rb b/test/site/gcs_site_test.rb
index 56514ef136..3185c43f3c 100644
--- a/test/site/gcs_site_test.rb
+++ b/test/site/gcs_site_test.rb
@@ -5,6 +5,15 @@ if SITE_CONFIGURATIONS[:gcs]
SITE = ActiveVault::Site.configure(:GCS, SITE_CONFIGURATIONS[:gcs])
include ActiveVault::Site::SharedSiteTests
+
+ test "signed URL generation" do
+ travel_to Time.now do
+ url = SITE.bucket.signed_url(path: FIXTURE_KEY, expires: 120) +
+ "&response-content-disposition=inline%3B+filename%3D%22test.txt%22"
+
+ assert_equal url, @site.url(FIXTURE_KEY, expires_in: 2.minutes, disposition: :inline, filename: "test.txt")
+ end
+ end
end
else
puts "Skipping GCS Site tests because no GCS configuration was supplied"