Sha256: d569917fe9b3e65d4074421d16ab2be593ad2981741168bf34b139b5d29fa169
Contents?: true
Size: 568 Bytes
Versions: 45
Compression:
Stored size: 568 Bytes
Contents
require File.expand_path('../abstract_unit', __FILE__) class TestEnum < ActiveSupport::TestCase fixtures :comments def test_enum_was comment = Comment.first assert_nil comment.shown assert_equal({}, comment.changed_attributes) comment.shown = :true assert_equal({ "shown" => nil }, comment.changed_attributes) assert_equal 'true', comment.shown assert_nil comment.shown_was comment.save comment.shown = :false assert_equal 'false', comment.shown assert_equal 'true', comment.shown_was end end
Version data entries
45 entries across 45 versions & 1 rubygems