This commit is contained in:
r888888888
2017-05-30 15:32:45 -07:00
parent 1478eff561
commit 216ca06fee
6 changed files with 96 additions and 15 deletions

View File

@@ -250,6 +250,16 @@ class ArtistTest < ActiveSupport::TestCase
end
end
context "when finding nico seiga artists" do
setup do
FactoryGirl.create(:artist, :name => "osamari", :url_string => "http://seiga.nicovideo.jp/user/illust/7017777")
end
should "find the artist by the profile" do
assert_artist_found("osamari", "http://seiga.nicovideo.jp/seiga/im4937663")
end
end
context "when finding twitter artists" do
setup do
FactoryGirl.create(:artist, :name => "hammer_(sunset_beach)", :url_string => "http://twitter.com/hamaororon")

View File

@@ -21,6 +21,11 @@ module Sources
assert_equal("osamari", @site_2.artist_name)
end
should "get the artist commentary" do
assert_equal("コジコジ", @site_2.artist_commentary_title)
assert_equal("懐かしいですよね。テ また懐かしいものを ", @site_2.artist_commentary_desc)
end
should "get the image url" do
assert_match(/^http:\/\/lohas\.nicoseiga\.jp\/priv\//, @site_1.image_url)
assert_match(/^http:\/\/lohas\.nicoseiga\.jp\/priv\//, @site_2.image_url)