potential fix for #3569

This commit is contained in:
Albert Yi
2018-07-20 10:55:39 -07:00
parent 182b986191
commit 6943c70a32
3 changed files with 32 additions and 22 deletions

View File

@@ -12,7 +12,7 @@ class UploadServiceTest < ActiveSupport::TestCase
],
"content_type" => "image/jpeg"
}
}.freeze
}
context "::Utils" do
subject { UploadService::Utils }
@@ -139,6 +139,13 @@ class UploadServiceTest < ActiveSupport::TestCase
@file = @upload.file
end
context "with an original_post_id" do
should "run" do
subject.expects(:distribute_files).times(3)
subject.process_file(@upload, @file, original_post_id: 12345)
end
end
should "run" do
subject.expects(:distribute_files).times(3)
subject.process_file(@upload, @file)