add pixiv id search

This commit is contained in:
albert
2013-03-31 14:43:54 -04:00
parent fc32a0023c
commit e2c2a8309d
7 changed files with 55 additions and 15 deletions

View File

@@ -965,11 +965,11 @@ class PostTest < ActiveSupport::TestCase
assert_equal(1, Post.tag_match("pixiv_id:34551381").count)
end
should "return posts for a pixiv novel id search" do
url = "http://www.pixiv.net/novel/show.php?id=2156088"
post = FactoryGirl.create(:post, :source => url)
assert_equal(1, Post.tag_match("pixiv_novel_id:2156088").count)
end
# should "return posts for a pixiv novel id search" do
# url = "http://www.pixiv.net/novel/show.php?id=2156088"
# post = FactoryGirl.create(:post, :source => url)
# assert_equal(1, Post.tag_match("pixiv_novel_id:2156088").count)
# end
should "return posts for a tag subscription search" do
post1 = FactoryGirl.create(:post, :tag_string => "aaa")