diff --git a/app/models/upload.rb b/app/models/upload.rb index bf5e8004a..bef5c513e 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -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 diff --git a/test/unit/pixiv_proxy_test.rb b/test/unit/pixiv_proxy_test.rb index 1e5452a24..3e4f0ba69 100644 --- a/test/unit/pixiv_proxy_test.rb +++ b/test/unit/pixiv_proxy_test.rb @@ -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