diff --git a/test/unit/artist_test.rb b/test/unit/artist_test.rb index 35097977b..5e4f703c8 100644 --- a/test/unit/artist_test.rb +++ b/test/unit/artist_test.rb @@ -244,9 +244,7 @@ class ArtistTest < ActiveSupport::TestCase end should "find nothing for bad IDs" do - assert_raise(PixivApiClient::Error) do - assert_artist_not_found("http://www.pixiv.net/member_illust.php?mode=medium&illust_id=32049358") - end + assert_artist_not_found("http://www.pixiv.net/member_illust.php?mode=medium&illust_id=32049358") end end diff --git a/test/unit/helpers/news_updates_helper_test.rb b/test/unit/helpers/news_updates_helper_test.rb deleted file mode 100644 index cc23870d4..000000000 --- a/test/unit/helpers/news_updates_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class NewsUpdatesHelperTest < ActionView::TestCase -end diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index f2785ba1b..5f7d06835 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -2113,7 +2113,7 @@ class PostTest < ActiveSupport::TestCase end assert_tag_match([post3, post1, post2], "order:comment_bumped") - assert_tag_match([post1, post3, post2], "order:comment_bumped_asc") + assert_tag_match([post2, post1, post3], "order:comment_bumped_asc") end should "return posts for a filesize search" do diff --git a/test/unit/sources/pawoo_test.rb b/test/unit/sources/pawoo_test.rb index 4a22bc64c..a97652ca6 100644 --- a/test/unit/sources/pawoo_test.rb +++ b/test/unit/sources/pawoo_test.rb @@ -17,7 +17,7 @@ module Sources end should "get the image url" do - assert_equal("https://img.pawoo.net/media_attachments/files/000/128/953/original/4c0a06087b03343f.png?1492461815", @site.image_url) + assert_equal("https://img.pawoo.net/media_attachments/files/000/128/953/original/4c0a06087b03343f.png", @site.image_url) end end end diff --git a/test/unit/sources/pixa_test.rb b/test/unit/sources/pixa_test.rb deleted file mode 100644 index 25bc97e86..000000000 --- a/test/unit/sources/pixa_test.rb +++ /dev/null @@ -1,39 +0,0 @@ -# # encoding: UTF-8 -# -# require 'test_helper' -# -# module Sources -# class PixaTest < ActiveSupport::TestCase -# context "The source site for pixa" do -# setup do -# @site = Sources::Site.new("http://www.pixa.cc/illustrations/show/75575") -# @site.get -# end -# -# should "get the profile" do -# assert_equal("http://www.pixa.cc/profiles/show/9191", @site.profile_url) -# end -# -# should "get the artist name" do -# assert_equal("air", @site.artist_name) -# end -# -# should "get the image url" do -# assert_equal("http://file0.pixa.cc/illustrations/34/cb/df/70/49/b4/52/2d/42/c6/middle/110910魔法少女のコピー.jpg?1315664621", @site.image_url) -# end -# -# should "get the tags" do -# assert(@site.tags.size > 0) -# first_tag = @site.tags.first -# assert_equal(2, first_tag.size) -# assert(first_tag[0] =~ /./) -# end -# -# should "convert a page into a json representation" do -# assert_nothing_raised do -# @site.to_json -# end -# end -# end -# end -# end diff --git a/test/unit/sources/pixiv_test.rb b/test/unit/sources/pixiv_test.rb index f6a5cb91c..836040c99 100644 --- a/test/unit/sources/pixiv_test.rb +++ b/test/unit/sources/pixiv_test.rb @@ -84,7 +84,7 @@ module Sources pixiv_tags = @site.tags.map(&:first) pixiv_links = @site.tags.map(&:last) - assert_equal(["漫画", "foo", "bar", "tag1", "tag2", "derp", "オリジナル"], pixiv_tags) + assert_equal(["漫画", "foo", "bar", "tag1", "tag2", "derp", "鉛筆", "色鉛筆", "シャープペンシル"], pixiv_tags) assert_contains(pixiv_links, /search\.php/) end diff --git a/test/unit/sources/tinami_test.rb b/test/unit/sources/tinami_test.rb deleted file mode 100644 index 6b422d926..000000000 --- a/test/unit/sources/tinami_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -# # encoding: UTF-8 -# -# require 'test_helper' -# -# module Sources -# class TinamiTest < ActiveSupport::TestCase -# context "The source site for tinami" do -# context "for tinami" do -# setup do -# @site = Sources::Site.new("http://www.tinami.com/view/308311") -# @site.get -# end -# -# should "get the profile" do -# assert_equal("http://www.tinami.com/creator/profile/29399", @site.profile_url) -# end -# -# should "get the artist name" do -# assert_match(/ROM/, @site.artist_name) -# end -# -# should "get the image url" do -# assert_equal("http://img.tinami.com/illust2/img/336/4e80b9773c084.png", @site.image_url) -# end -# -# should "get the tags" do -# assert(@site.tags.size > 0) -# end -# -# should "convert a page into a json representation" do -# assert_nothing_raised do -# @site.to_json -# end -# end -# end -# end -# end -# end diff --git a/test/unit/tag_subscription_test.rb b/test/unit/tag_subscription_test.rb index a7a8d87f4..ba6215d1b 100644 --- a/test/unit/tag_subscription_test.rb +++ b/test/unit/tag_subscription_test.rb @@ -79,7 +79,7 @@ class TagSubscriptionTest < ActiveSupport::TestCase assert_equal(1, CurrentUser.user.subscriptions.size) assert_equal(3, CurrentUser.user.saved_searches.size) - assert_equal(["bar foo", "bar", "baz"], CurrentUser.user.saved_searches.pluck(:query)) + assert_equal(["foo bar", "bar", "baz"], CurrentUser.user.saved_searches.pluck(:query)) assert_equal([%w[artist_1]]*3, CurrentUser.user.saved_searches.pluck(:labels)) end end