Sha256: 63a5adcfb99a66e087e379ec3db7872f57e7d65b367b316abb56034edd1ddd20
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
require File.join( File.dirname(__FILE__), "test_helper") # ralbum require 'ralbum' require 'ralbum/album_tree/album' require 'ralbum/album_tree/image_pool' require 'ralbum/album_tree/image_file' class TestImagePool < Test::Unit::TestCase def test_image_pool album = Album.new(nil, "key", "title", "description") ipool = ImagePool.new(album, "md5", "key", "title", "description" ) thumb_local_path = File.join($PHOTOTREE_DIRECTORY, "r_photo01.jpg" ) thumb_src_url = "" thumb_imagefile = ImageFile.new(ipool, thumb_local_path, "r_photo01.jpg", thumb_src_url ) thumb = ipool.image( "thumb", thumb_imagefile ) default_local_path = File.join($PHOTOTREE_DIRECTORY, "r_photo01.jpg" ) default_src_url = "" default_imagefile = ImageFile.new(ipool, default_local_path, "r_photo01.jpg", default_src_url ) default = ipool.image( "default", default_imagefile ) assert_equal thumb, ipool.thumb # assert_equal "", thumb.url # assert_equal "r_photo01.jpg", thumb.page_url # assert_equal "r_photo01.jpg", thumb.url assert_equal default, ipool.default_image_file # assert_equal "", default.url # assert_equal "r_photo01.jpg", default.page_url # assert_equal "r_photo01.jpg", default.url end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gf-ralbum-0.0.5 | test/ralbum/tc_image_pool.rb |