Add test case for rewriting ugoira URLs.

This commit is contained in:
evazion
2014-10-28 21:50:16 -05:00
parent 6a965db911
commit 9f96965bb4

View File

@@ -221,6 +221,7 @@ class UploadTest < ActiveSupport::TestCase
end
post = Post.last
assert_equal("http://www.google.com/intl/en_ALL/images/logo.gif", post.source)
assert_equal("foo hoge lowres", post.tag_string)
assert_equal("s", post.rating)
assert_equal(@upload.uploader_id, post.uploader_id)
@@ -251,6 +252,7 @@ class UploadTest < ActiveSupport::TestCase
assert_equal("0d94800c4b520bf3d8adda08f95d31e2", post.md5)
assert_equal(60, post.image_width)
assert_equal(60, post.image_height)
assert_equal("http://i1.pixiv.net/img-zip-ugoira/img/2014/10/05/23/42/23/46378654_ugoira1920x1080.zip", post.source)
assert_operator(File.size(post.large_file_path), :>, 0)
assert_operator(File.size(post.preview_file_path), :>, 0)
end