Sha256: f674427008f4e8f4890ae955f6011831b3ca29b1c5fbe0b6f3dca981eef849a2
Contents?: true
Size: 575 Bytes
Versions: 4
Compression:
Stored size: 575 Bytes
Contents
# frozen_string_literal: true 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_predicate author, :changed? author.name << " Griffin" assert_predicate author, :name_changed? author.save! author.reload assert_equal "Sean Griffin", author.name assert_not_predicate author, :changed? end end end
Version data entries
4 entries across 4 versions & 1 rubygems