Skip to content

Commit 7dd76ec

Browse files
authored
Merge pull request #328 from lardawge/ls/try-to-recreate-initial-image-processing-in-spec
Update specs to cover original image processing
2 parents 521dbc0 + a014406 commit 7dd76ec

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

spec/integrations/store_in_background_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
user.reload
3232
end
3333

34+
it 'processes the original image' do
35+
image = MiniMagick::Image.open(user.avatar.path)
36+
expect(image.width).to eql(1960)
37+
end
38+
3439
it 'creates the versions' do
3540
version_paths = user.avatar.versions.keys.map { |key| user.avatar.send(key).current_path }
3641
version_paths.each { |path| expect(File.exist?(path)).to be(true) }

spec/support/dummy_app/app/uploaders/avatar_uploader.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def cache_dir
3131

3232
# Process files as they are uploaded:
3333
# process scale: [200, 300]
34+
process resize_to_fit: [1960, 1960]
3435
#
3536
# def scale(width, height)
3637
# # do something

0 commit comments

Comments
 (0)