Sha256: 212c5efeb805eec45ba38dc327eb3bb82a2b5614cd0248a7508530e55d13ad7d

Contents?: true

Size: 570 Bytes

Versions: 6

Compression:

Stored size: 570 Bytes

Contents

require 'test_helper'

class ActsAsTaggableOn::TagTest < ActiveSupport::TestCase
  fixtures :all  

  test "should get popular tags" do
    popular = ActsAsTaggableOn::Tag.popular
    assert_equal popular.first['count'], 2
  end
  
  test "should get popular tags of one type" do
    popular = ActsAsTaggableOn::Tag.popular(20, 'clipping')
    assert_equal popular.to_a.size, 2
    assert_equal popular.first['count'], 2
  end
  
  test "should get related tags" do
    related = tags(:misc).related_tags
    assert_equal(related, [tags(:related_to_misc)])
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
community_engine-3.0.0 test/unit/acts_as_taggable_on/tag_test.rb
community_engine-2.3.2 test/unit/acts_as_taggable_on/tag_test.rb
community_engine-2.3.1 test/unit/acts_as_taggable_on/tag_test.rb
community_engine-2.3.0 test/unit/acts_as_taggable_on/tag_test.rb
community_engine-2.1.0 test/unit/acts_as_taggable_on/tag_test.rb
community_engine-2.0.0 test/unit/acts_as_taggable_on/tag_test.rb