Sha256: 71c0edeeb94996d6816f8fd32ba7980621e6061288c1555188b03eb2336219fd

Contents?: true

Size: 743 Bytes

Versions: 8

Compression:

Stored size: 743 Bytes

Contents

require 'test_helper'

class ImageTest < ActiveSupport::TestCase

  fixtures :images

  def test_titles
    assert_equal "The%20world!.gif", images(:the_world).filename
    assert_equal "The World!", images(:the_world).title

    assert_equal "car-wallpapers19.jpg", images(:our_car).filename
    assert_equal "Car Wallpapers19", images(:our_car).title
  end

  def test_per_page
    assert_equal 18, Image.per_page(dialog = true)
    assert_equal 20, Image.per_page # dialog = false
  end

  def test_attachment_fu_options
    assert_equal 20.megabytes, Image.attachment_options[:max_size]
    
    # want to change this to ImageScience at some point. Rmagick sucks.
    assert_equal 'Rmagick', Image.attachment_options[:processor]
  end

end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
jacobat-refinerycms-0.9.6.14 test/unit/image_test.rb
refinerycms-0.9.6.14 test/unit/image_test.rb
refinerycms-0.9.6.13 test/unit/image_test.rb
refinerycms-0.9.6.12 test/unit/image_test.rb
refinerycms-0.9.6.11 test/unit/image_test.rb
refinerycms-0.9.6.10 test/unit/image_test.rb
refinerycms-0.9.6.9 test/unit/image_test.rb
refinerycms-0.9.6.8 test/unit/image_test.rb