Sha256: 8ef9241049d62584c29047a86a2ab3350f24acd3a14eb3eae3e4a0b7b186c39d
Contents?: true
Size: 734 Bytes
Versions: 2
Compression:
Stored size: 734 Bytes
Contents
require "spec_helper" RSpec.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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
paper_trail-7.1.0 | spec/models/custom_primary_key_record_spec.rb |
paper_trail-7.0.3 | spec/models/custom_primary_key_record_spec.rb |