Sha256: c398c0b70a82d0e22b08bb8aa980ac885c384a02f3bce9718b417b416a7cf983

Contents?: true

Size: 511 Bytes

Versions: 6

Compression:

Stored size: 511 Bytes

Contents

require 'rails_helper'

describe NotOnUpdate, :type => :model do
  describe "#touch_with_version", :versioning => true do
    let!(:record) { described_class.create! }

    it "should create a version, regardless" do
      expect { record.touch_with_version }.to change {
        PaperTrail::Version.count
      }.by(+1)
    end

    it "increments the `:updated_at` timestamp" do
      before = record.updated_at
      record.touch_with_version
      expect(record.updated_at).to be > before
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
paper_trail-4.2.0 spec/models/not_on_update_spec.rb
paper_trail-4.1.0 spec/models/not_on_update_spec.rb
paper_trail-4.0.2 spec/models/not_on_update_spec.rb
paper_trail-4.0.1 spec/models/not_on_update_spec.rb
paper_trail-4.0.0 spec/models/not_on_update_spec.rb
paper_trail-4.0.0.rc2 spec/models/not_on_update_spec.rb