Sha256: a873ec7f9a960fd94eddb9db27403e0eff46bac448e1fba0c703e5618da4d4b2
Contents?: true
Size: 729 Bytes
Versions: 9
Compression:
Stored size: 729 Bytes
Contents
require "rails_helper" describe CustomPrimaryKeyRecord, type: :model do it { is_expected.to be_versioned } describe "#versions" do it "returns instances of CustomPrimaryKeyRecordVersion", versioning: true do custom_primary_key_record = described_class.create! custom_primary_key_record.update_attributes!(name: "bob") version = custom_primary_key_record.versions.last expect(version).to be_a(CustomPrimaryKeyRecordVersion) version_from_db = CustomPrimaryKeyRecordVersion.last expect(version_from_db.reify).to be_a(CustomPrimaryKeyRecord) custom_primary_key_record.destroy expect(CustomPrimaryKeyRecordVersion.last.reify).to be_a(CustomPrimaryKeyRecord) end end end
Version data entries
9 entries across 8 versions & 2 rubygems