disable reraise on upload errors

This commit is contained in:
albert
2011-09-15 18:35:42 -04:00
parent cfb4c04d6a
commit 18cfc49d96
2 changed files with 11 additions and 1 deletions

View File

@@ -74,7 +74,6 @@ class Upload < ActiveRecord::Base
end
end
rescue Exception => x
raise
update_attribute(:status, "error: #{x} - #{x.message}")
ensure
delete_temp_file

View File

@@ -13,5 +13,16 @@ class PixivProxyTest < ActiveSupport::TestCase
assert(first_tag[0] =~ /./)
assert(first_tag[1] =~ /tags\.php\?tag=/)
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