Sha256: fd00d6dafd808ec0fb7e9d5cbd60a6f8f49dc4b259981aae2c32e6b37d569f0a

Contents?: true

Size: 384 Bytes

Versions: 14

Compression:

Stored size: 384 Bytes

Contents

require 'test_helper'


class Order < ActiveRecord::Base
  add_to_bag :category
end


class AccessorTest < ActiveSupport::TestCase

  def setup
    @order = Order.new
  end

  test "should reject overwriting of column category" do
    value = 'abc'
    assert @order.respond_to?(:category)
    @order.category = value
    assert_equal false, @order.bag.has_key?(:category)
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
act_with_bag-1.0.4 test/accessor_test.rb
act_with_bag-1.0.3 test/accessor_test.rb
act_with_bag-1.0.2 test/accessor_test.rb
act_with_bag-1.0.0 test/accessor_test.rb
act_with_bag-0.5.7 test/accessor_test.rb
act_with_bag-0.5.6 test/accessor_test.rb
act_with_bag-0.4.9.1 test/accessor_test.rb
act_with_bag-0.5.5 test/accessor_test.rb
act_with_bag-0.5.3 test/accessor_test.rb
act_with_bag-0.5.2 test/accessor_test.rb
act_with_bag-0.5.1 test/accessor_test.rb
act_with_bag-0.4.9 test/accessor_test.rb
act_with_bag-0.4.7 test/accessor_test.rb
act_with_bag-0.4.4 test/accessor_test.rb