public
Description: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.
Homepage: http://fleximage.rubyforge.org
Clone URL: git://github.com/Squeegy/fleximage.git
fleximage / test / unit / magic_columns_test.rb
100644 18 lines (15 sloc) 0.578 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'test/test_helper'
 
class FleximageMagicColumnsTest < Test::Unit::TestCase
  def test_should_save_data_in_magic_columns_from_local
    p = PhotoFile.new(:image_file => files(:photo))
    assert_equal 'photo.jpg', p.image_filename
    assert_equal 1024, p.image_height
    assert_equal 768, p.image_width
  end
  
  def test_should_save_data_in_magic_columns_from_url
    p = PhotoFile.new(:image_file_url => files(:web_photo))
    assert_equal files(:web_photo), p.image_filename
    assert_equal 110, p.image_height
    assert_equal 276, p.image_width
  end
end