Sha256: 97cf06f060de444d826fb0ca8047e3ad26915ca0c622e4ccc10a413b16e93299
Contents?: true
Size: 626 Bytes
Versions: 2
Compression:
Stored size: 626 Bytes
Contents
require File.dirname(__FILE__) + '/../../test/test_helper' class FleximageTempImageTest < Test::Unit::TestCase def test_should_save_and_use_a_temp_image a1 = Avatar.new(:image_file => files(:photo)) assert !a1.save assert_match /^\d+_\d+$/, a1.image_file_temp assert File.exists?("#{RAILS_ROOT}/tmp/fleximage/#{a1.image_file_temp}") temp_file_path = a1.image_file_temp a2 = Avatar.new(:username => 'Alex Wayne', :image_file_temp => temp_file_path) assert a2.save assert File.exists?(a2.file_path) assert !File.exists?("#{RAILS_ROOT}/tmp/fleximage/#{temp_file_path}") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fleximage-1.0.1 | test/unit/temp_image_test.rb |
fleximage-1.0.0 | test/unit/temp_image_test.rb |