reverse logic of age

This commit is contained in:
r888888888
2013-04-23 13:11:39 -07:00
parent ed66f71fad
commit db69d45632
4 changed files with 10 additions and 1 deletions

View File

@@ -839,6 +839,12 @@ class PostTest < ActiveSupport::TestCase
end
context "Searching:" do
should "return posts for the age:<1m tag" do
post1 = FactoryGirl.create(:post, :tag_string => "aaa")
count = Post.tag_match("age:<1m").count
assert_equal(1, count)
end
should "return posts for the ' tag" do
post1 = FactoryGirl.create(:post, :tag_string => "'")
post2 = FactoryGirl.create(:post, :tag_string => "aaa bbb")