disable reraise on upload errors
This commit is contained in:
@@ -74,7 +74,6 @@ class Upload < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue Exception => x
|
rescue Exception => x
|
||||||
raise
|
|
||||||
update_attribute(:status, "error: #{x} - #{x.message}")
|
update_attribute(:status, "error: #{x} - #{x.message}")
|
||||||
ensure
|
ensure
|
||||||
delete_temp_file
|
delete_temp_file
|
||||||
|
|||||||
@@ -13,5 +13,16 @@ class PixivProxyTest < ActiveSupport::TestCase
|
|||||||
assert(first_tag[0] =~ /./)
|
assert(first_tag[0] =~ /./)
|
||||||
assert(first_tag[1] =~ /tags\.php\?tag=/)
|
assert(first_tag[1] =~ /tags\.php\?tag=/)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "get a manga page" do
|
||||||
|
url ="http://img65.pixiv.net/img/kiyoringo/21755794_p2.png"
|
||||||
|
results = PixivProxy.get_single(url)
|
||||||
|
assert_equal("member.php?id=4015", results[:profile_url])
|
||||||
|
assert(results[:jp_tags].size > 0)
|
||||||
|
first_tag = results[:jp_tags][0]
|
||||||
|
assert_equal(2, first_tag.size)
|
||||||
|
assert(first_tag[0] =~ /./)
|
||||||
|
assert(first_tag[1] =~ /tags\.php\?tag=/)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user