1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00
paper-trail-gem--paper_trail/spec/models/car_spec.rb
Jared Beck 23ffbdc7e1 Fix NoMethodError in load_changeset
Fixes NoMethodError when an STI parent class is unversioned and
thus does not respond to `unserialize_attribute_changes_for_paper_trail!`

[Fixes #738]
2016-05-01 00:21:51 -04:00

13 lines
347 B
Ruby

require "rails_helper"
describe Car, type: :model do
it { is_expected.to be_versioned }
describe "changeset", versioning: true do
it "has the expected keys (see issue 738)" do
car = Car.create!(name: "Alice")
car.update_attributes(name: "Bob")
assert_includes car.versions.last.changeset.keys, "name"
end
end
end