Sha256: 7468dbb362bb7d37c2ae115362a294b42e59f97fd9c992777bd85954eaebffbd

Contents?: true

Size: 406 Bytes

Versions: 16

Compression:

Stored size: 406 Bytes

Contents

require 'test_helper'


class Order < ActiveRecord::Base
  add_to_bag :aa, :bb, :cc
  delete_from_bag :bb
end


class DeleteTest < ActiveSupport::TestCase

  def setup
    @order = Order.new
  end

  test "delete a field" do
    @order.aa = 'aa'
    @order.bb = 'bb'
    @order.cc = 'cc'
    @order.save
    assert_equal 'aa', @order.aa
    assert_nil @order.bb
    assert_equal 'cc', @order.cc
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

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