aboutsummaryrefslogtreecommitdiffstats
path: root/test/controllers/direct_uploads_controller_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2017-07-23 11:05:20 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2017-07-23 11:05:20 -0500
commit46da4ee7daf1ecaa2fc47a260ccb58e119a1b5ea (patch)
treebc19d2f900055e39de21f62ec27e9079723cfa5f /test/controllers/direct_uploads_controller_test.rb
parent8f20624820ed0922b33fceb4013d3ff11015b366 (diff)
downloadrails-46da4ee7daf1ecaa2fc47a260ccb58e119a1b5ea.tar.gz
rails-46da4ee7daf1ecaa2fc47a260ccb58e119a1b5ea.tar.bz2
rails-46da4ee7daf1ecaa2fc47a260ccb58e119a1b5ea.zip
Switch to simpler signed_id for blob rather than full GlobalID
We don't need to lookup multiple different classes, so no need to use a globalid.
Diffstat (limited to 'test/controllers/direct_uploads_controller_test.rb')
-rw-r--r--test/controllers/direct_uploads_controller_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/controllers/direct_uploads_controller_test.rb b/test/controllers/direct_uploads_controller_test.rb
index 0083492929..06e76cfa8b 100644
--- a/test/controllers/direct_uploads_controller_test.rb
+++ b/test/controllers/direct_uploads_controller_test.rb
@@ -24,8 +24,8 @@ if SERVICE_CONFIGURATIONS[:s3]
details = JSON.parse(@response.body)
- 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
+ assert_match /#{SERVICE_CONFIGURATIONS[:s3][:bucket]}\.s3.(\S+)?amazonaws\.com/, details["upload_to_url"]
+ assert_equal "hello.txt", ActiveStorage::Blob.find_signed(details["signed_blob_id"]).filename.to_s
end
end
else
@@ -54,8 +54,8 @@ if SERVICE_CONFIGURATIONS[:gcs]
details = JSON.parse(@response.body)
- assert_match %r{storage\.googleapis\.com/#{@config[:bucket]}}, details["url"]
- assert_equal "hello.txt", GlobalID::Locator.locate_signed(details["sgid"]).filename.to_s
+ assert_match %r{storage\.googleapis\.com/#{@config[:bucket]}}, details["upload_to_url"]
+ assert_equal "hello.txt", ActiveStorage::Blob.find_signed(details["signed_blob_id"]).filename.to_s
end
end
else