Update `UploadCreator` specs to include cropping code path.

This commit is contained in:
Guo Xiang Tan 2018-08-17 15:22:12 +08:00
parent fae8757cd4
commit 4b7c5ba162
1 changed files with 4 additions and 1 deletions

View File

@ -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