aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/models/blob_test.rb
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-04-29 07:01:44 -0400
committerGeorge Claghorn <george@basecamp.com>2018-04-29 07:07:59 -0400
commit5f2ee4c0bb790480a7032d1779052be2e1e46808 (patch)
tree060ff5db306afa03df2dee204fa3067726049401 /activestorage/test/models/blob_test.rb
parent8781b03b7ef4897a679f25220e73dce02bc43552 (diff)
downloadrails-5f2ee4c0bb790480a7032d1779052be2e1e46808.tar.gz
rails-5f2ee4c0bb790480a7032d1779052be2e1e46808.tar.bz2
rails-5f2ee4c0bb790480a7032d1779052be2e1e46808.zip
Stream blobs from disk in 5 MB chunks
Match other services, which all use a 5 MB chunk size.
Diffstat (limited to 'activestorage/test/models/blob_test.rb')
-rw-r--r--activestorage/test/models/blob_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activestorage/test/models/blob_test.rb b/activestorage/test/models/blob_test.rb
index fead17d33a..daa01015f7 100644
--- a/activestorage/test/models/blob_test.rb
+++ b/activestorage/test/models/blob_test.rb
@@ -62,7 +62,7 @@ class ActiveStorage::BlobTest < ActiveSupport::TestCase
end
test "download yields chunks" do
- blob = create_blob data: "a" * 75.kilobytes
+ blob = create_blob data: "a" * 5.0625.megabytes
chunks = []
blob.download do |chunk|
@@ -70,8 +70,8 @@ class ActiveStorage::BlobTest < ActiveSupport::TestCase
end
assert_equal 2, chunks.size
- assert_equal "a" * 64.kilobytes, chunks.first
- assert_equal "a" * 11.kilobytes, chunks.second
+ assert_equal "a" * 5.megabytes, chunks.first
+ assert_equal "a" * 64.kilobytes, chunks.second
end
test "urls expiring in 5 minutes" do