test/unit/image_test.rb in refinerycms-0.9.6.5 vs test/unit/image_test.rb in refinerycms-0.9.6.6
- old
+ new
@@ -1,14 +1,25 @@
require 'test_helper'
class ImageTest < ActiveSupport::TestCase
- fixtures :images
+ fixtures :images
- def test_titles
- end
-
- def test_per_page
-
- end
+ def test_titles
+ assert_equal "The%20world!.gif", images(:the_world).filename
+ assert_equal "The World!", images(:the_world).title
-end
\ No newline at end of file
+ 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 50.megabytes, Image.attachment_options[:max_size]
+ assert_equal 'Rmagick', Image.attachment_options[:processor]
+ end
+
+end