Sha256: 802124952dad669c748893eb12045b3eb20b3448df9b639b967285ec78e50b05

Contents?: true

Size: 425 Bytes

Versions: 3

Compression:

Stored size: 425 Bytes

Contents

require 'test_helper'

module Ominous
  class CloserTest < ActiveSupport::TestCase
    def setup
      @warning = Warning.find(1)
      @closer = Closer.find(1)
    end
    
    def test_setup
      assert(@warning.closers.include?(@closer))
    end
    
    def test_adding_closer_again_does_not_add_duplicate
      assert_raise ActiveRecord::RecordInvalid do
        @warning.closers << @closer
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ominous-0.0.4 test/unit/ominous/closer_test.rb
ominous-0.0.3 test/unit/ominous/closer_test.rb
ominous-0.0.2 test/unit/ominous/closer_test.rb