From 4b7c5ba162caae9aa736d8e6136c369acc98a699 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 17 Aug 2018 15:22:12 +0800 Subject: [PATCH] Update `UploadCreator` specs to include cropping code path. --- spec/lib/upload_creator_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/lib/upload_creator_spec.rb b/spec/lib/upload_creator_spec.rb index 02861221a39..4238918225d 100644 --- a/spec/lib/upload_creator_spec.rb +++ b/spec/lib/upload_creator_spec.rb @@ -31,7 +31,10 @@ RSpec.describe UploadCreator do it 'should store the upload with the right extension' do expect do - UploadCreator.new(file, filename).create_for(user.id) + UploadCreator.new(file, filename, + force_optimize: true, + type: UploadCreator::TYPES_TO_CROP.first + ).create_for(user.id) end.to change { Upload.count }.by(1) upload = Upload.last