skip pixiv-related tests that throw networking errors

This commit is contained in:
Albert Yi
2018-05-14 11:02:22 -07:00
parent 8d5db3723b
commit 8b16934aaa
7 changed files with 143 additions and 101 deletions

View File

@@ -21,7 +21,9 @@ class ArtistUrl < ApplicationRecord
begin
url = Sources::Site.new(url).normalize_for_artist_finder!
rescue PixivApiClient::Error, Sources::Site::NoStrategyError
rescue PixivApiClient::Error
raise if Rails.env.test?
rescue Sources::Site::NoStrategyError
end
url = url.gsub(/\/+\Z/, "")
url + "/"

View File

@@ -118,8 +118,6 @@ class BulkUpdateRequest < ApplicationRecord
update(forum_post_id: forum_post.id)
else
forum_topic = ForumTopic.create(title: title, category_id: 1, original_post_attributes: {body: reason_with_link})
puts forum_topic.errors.full_messages
puts forum_topic.original_post.errors.full_messages
update(forum_topic_id: forum_topic.id, forum_post_id: forum_topic.posts.first.id)
end
end