Skip to content

Commit

Permalink
Add spec to ensure #recreate_versions! doesn't break when file isn't …
Browse files Browse the repository at this point in the history
…stored

The issue itself is already fixed by 28190e9.
Closes #2186
  • Loading branch information
mshibuya committed Jan 8, 2023
1 parent fda48ef commit 0284f85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/uploader/versions_spec.rb
Expand Up @@ -718,6 +718,13 @@ def upcase
let(:thumb_contents) { File.read(public_path(@uploader.thumb.to_s)) }
let(:small_thumb_contents) { File.read(public_path(@uploader.small_thumb.to_s)) }

context "when the file is not stored" do
it "should not break" do
@uploader.recreate_versions!
@uploader.recreate_versions!(:small_thumb)
end
end

context "when no versions are given" do
it "should process file based on the version" do
@uploader.store!(bork_file)
Expand Down

0 comments on commit 0284f85

Please sign in to comment.