From cd4c2a4d8ef96a63bf38f5aba1727eca5d8ac7e5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 6 Jul 2017 16:01:18 +0200 Subject: [PATCH] Helper methods are private --- test/service/mirror_service_test.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/service/mirror_service_test.rb b/test/service/mirror_service_test.rb index 95fe369a4c..45535c754e 100644 --- a/test/service/mirror_service_test.rb +++ b/test/service/mirror_service_test.rb @@ -41,9 +41,10 @@ class ActiveStorage::Service::MirrorServiceTest < ActiveSupport::TestCase end end - def upload(data, to:) - SecureRandom.base58(24).tap do |key| - @service.upload key, StringIO.new(data) + private + def upload(data, to:) + SecureRandom.base58(24).tap do |key| + @service.upload key, StringIO.new(data), checksum: Digest::MD5.base64digest(data) + end end - end end