Sha256: e6b16dc40246314ac6277e8281fb63a1ee6390195ae711e3620c8e0f1baf880f
Contents?: true
Size: 755 Bytes
Versions: 10
Compression:
Stored size: 755 Bytes
Contents
require 'test_helper' class LocalImagePresetsTest < ActiveSupport::TestCase setup do @record = ImageUpload.create(:image => fixture_file_upload('/image.jpg', 'image/jpeg')) end test "should save/destory main image and thumbs" do original = Rails.root.join('tmp', 'uploads', 'images', 'original', @record.image.filename) big = Rails.root.join('tmp', 'uploads', 'images', 'big', @record.image.filename) small = Rails.root.join('tmp', 'uploads', 'images', 'small', @record.image.filename) assert ::File.exists?(original) assert ::File.exists?(big) assert ::File.exists?(small) @record.destroy assert !::File.exists?(original) assert !::File.exists?(big) assert !::File.exists?(small) end end
Version data entries
10 entries across 10 versions & 1 rubygems