aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/direct_uploads_controller_test.rb2
-rw-r--r--test/service/s3_service_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/direct_uploads_controller_test.rb b/test/direct_uploads_controller_test.rb
index f96a37f758..8aa61f53cb 100644
--- a/test/direct_uploads_controller_test.rb
+++ b/test/direct_uploads_controller_test.rb
@@ -27,7 +27,7 @@ if SERVICE_CONFIGURATIONS[:s3]
details = JSON.parse(@response.body)
- assert_match /rails-activestorage\.s3.amazonaws\.com/, details["url"]
+ assert_match /#{SERVICE_CONFIGURATIONS[:s3][:bucket]}\.s3.(\S+)?amazonaws\.com/, details["url"]
assert_equal "hello.txt", GlobalID::Locator.locate_signed(details["sgid"]).filename.to_s
end
end
diff --git a/test/service/s3_service_test.rb b/test/service/s3_service_test.rb
index d823e1fdca..6115cb8db0 100644
--- a/test/service/s3_service_test.rb
+++ b/test/service/s3_service_test.rb
@@ -27,7 +27,7 @@ if SERVICE_CONFIGURATIONS[:s3]
end
test "signed URL generation" do
- assert_match /.+s3.+amazonaws.com.*response-content-disposition=inline.*avatar\.png/,
+ assert_match /#{SERVICE_CONFIGURATIONS[:s3][:bucket]}\.s3.(\S+)?amazonaws.com.*response-content-disposition=inline.*avatar\.png/,
@service.url(FIXTURE_KEY, expires_in: 5.minutes, disposition: :inline, filename: "avatar.png")
end
end