Sha256: 218ba4eefc33f7eb5a90f4641a52b8c67b180cf034780fbe688ca415de2ee875

Contents?: true

Size: 646 Bytes

Versions: 4

Compression:

Stored size: 646 Bytes

Contents

require "rails_helper"

describe Document, type: :model do
  describe "`have_a_version_with` matcher", versioning: true do
    it "works with custom versions association" do
      document = Document.create!(name: "Foo")
      document.update_attributes!(name: "Bar")

      expect(document).to have_a_version_with(name: "Foo")
    end
  end

  describe "`have_a_version_with_changes` matcher", versioning: true do
    it "works with custom versions association" do
      document = Document.create!(name: "Foo")
      document.update_attributes!(name: "Bar")

      expect(document).to have_a_version_with_changes(name: "Bar")
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-7.0.2/spec/models/document_spec.rb
paper_trail-7.0.2 spec/models/document_spec.rb
paper_trail-7.0.1 spec/models/document_spec.rb
paper_trail-7.0.0 spec/models/document_spec.rb