Sha256: 7c3983fbfd69f7bf0327fb090e27ed420e288f79806538bcf700ba68cbf08abf
Contents?: true
Size: 750 Bytes
Versions: 1
Compression:
Stored size: 750 Bytes
Contents
require 'test_helper' class ImagePresetsTest < ActiveSupport::TestCase include ActionDispatch::TestProcess setup :create_image test "should save/destory main image and thumbs" do #assert_equal 58841, @record.image.size #assert_equal 89314, @record.image.size(:big) #assert_equal 12057, @record.image.size(:small) original = @record.image.realpath big = @record.image.realpath(:big) small = @record.image.realpath(:small) @record.destroy assert !::File.exists?(original) assert !::File.exists?(big) assert !::File.exists?(small) end protected def create_image @record = ImageUpload.create :image => fixture_file_upload(::File.join('', 'image.jpg'), 'image/jpeg') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_uploads-0.1.5 | test/image_presets_test.rb |