Skip to content

Commit

Permalink
Add test for find_tagged with using :include and :order.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Viney authored and Jonathan Viney committed Feb 18, 2009
1 parent 0462f7e commit e45c1ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/acts_as_taggable_test.rb
Expand Up @@ -10,6 +10,10 @@ def test_find_related_tags_with
assert_equivalent [tags(:bad), tags(:question)], Post.find_related_tags([tags(:good), tags(:nature)])
end

def test_find_tagged_with_include_and_order
assert_equal photos(:sam_sky, :sam_flower, :jonathan_dog), Photo.find_tagged_with("Nature", :order => "photos.title DESC", :include => :user)
end

def test_find_related_tags_with_non_existent_tags
assert_equal [], Post.find_related_tags("ABCDEFG")
assert_equal [], Post.find_related_tags(['HIJKLM'])
Expand Down

0 comments on commit e45c1ee

Please sign in to comment.