Sha256: b1b8e3cdd6c2f9abf474d0186ed877a61ab512d33422ef47e1cce7230dc97c5a
Contents?: true
Size: 775 Bytes
Versions: 1
Compression:
Stored size: 775 Bytes
Contents
require 'test_helper' class ImageUploadTest < ActiveSupport::TestCase include ActionDispatch::TestProcess setup :create_image test 'should save/destory main image and thumbs' do #assert_equal 58841, @image.size #assert_equal 89314, @image.size(:big) #assert_equal 12057, @image.size(:small) original = @image.realpath big = @image.realpath(:big) small = @image.realpath(:small) @image.delete assert !File.exists?(original) assert !File.exists?(big) assert !File.exists?(small) end protected def create_image @options = { :presets => [:small, :big] } @image = RailsUploads::Types::Image.new(fixture_file_upload(::File.join('', 'image.jpg'), 'image/jpeg'), @options) @image.store end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_uploads-0.1.4 | test/image_upload_test.rb |