Sha256: 8330d00d2dd81dc7a2fbda0bcb47292b08c8bed7e2b428896026f4a5a9b72de2
Contents?: true
Size: 484 Bytes
Versions: 8
Compression:
Stored size: 484 Bytes
Contents
require 'cases/helper' module ActiveRecord class StringTypeTest < ActiveRecord::TestCase test "string mutations are detected" do klass = Class.new(Base) klass.table_name = 'authors' author = klass.create!(name: 'Sean') assert_not author.changed? author.name << ' Griffin' assert author.name_changed? author.save! author.reload assert_equal 'Sean Griffin', author.name assert_not author.changed? end end end
Version data entries
8 entries across 8 versions & 1 rubygems