Sha256: b99cf878032ff8ae1221cf8854a2ae9d867784ce0a20e620247f12bd9f37c58c

Contents?: true

Size: 512 Bytes

Versions: 7

Compression:

Stored size: 512 Bytes

Contents

require 'test_helper'

module Categorical
  class TaggingTest < ActiveSupport::TestCase
    def test_tagging_belongs_to_tag
      tag = Tag.create!(label: 'label')
      tagging = Tagging.create!

      tagging.tag = tag
      tagging.save!

      assert_equal(tagging.tag, tag)
    end

    def test_tagging_belongs_to_taggable
      taggable = Post.create!
      tagging = Tagging.create!

      tagging.taggable = taggable
      tagging.save!

      assert_equal(tagging.taggable, taggable)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
categorical-0.0.10 test/models/categorical/tagging_test.rb
categorical-0.0.9.1 test/models/categorical/tagging_test.rb
categorical-0.0.9 test/models/categorical/tagging_test.rb
categorical-0.0.9.rc test/models/categorical/tagging_test.rb
categorical-0.0.8.rc test/models/categorical/tagging_test.rb
categorical-0.0.6.rc test/models/categorical/tagging_test.rb
categorical-0.0.4 test/models/categorical/tagging_test.rb