Sha256: 6bc7858f44138f719374ac0382aa276df50e6e09e098072f76d248bac4b3f744

Contents?: true

Size: 871 Bytes

Versions: 9

Compression:

Stored size: 871 Bytes

Contents

require 'rails_helper'

module Logistics
  module Core
    RSpec.describe OperationDocument, type: :model do
      it 'has a valid factory' do
        expect(create(:operation_document)).to be_valid
      end

      it 'is invalid with no document' do
        expect(build(:operation_document, :document => '')).not_to be_valid
      end

      it 'is invalid with no original' do
        expect(build(:operation_document, :original => nil)).not_to be_valid
      end

      it 'is invalid with no copy' do
        expect(build(:operation_document, :copy => nil)).not_to be_valid
      end

      it 'is invalid with no certified' do
        expect(build(:operation_document, :certified => nil)).not_to be_valid
      end

      it 'is invalid with no operation' do
        expect(build(:operation_document, :operation => nil)).not_to be_valid
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logistics_core-21.11.2 spec/models/logistics/core/operation_document_spec.rb
logistics_core-21.11.1 spec/models/logistics/core/operation_document_spec.rb
logistics_core-21.08.1 spec/models/logistics/core/operation_document_spec.rb
logistics_core-21.03.1 spec/models/logistics/core/operation_document_spec.rb
logistics_core-20.10.3 spec/models/logistics/core/operation_document_spec.rb
logistics_core-20.10.2 spec/models/logistics/core/operation_document_spec.rb
logistics_core-20.10.1 spec/models/logistics/core/operation_document_spec.rb
logistics_core-20.9.1 spec/models/logistics/core/operation_document_spec.rb
logistics_core-20.8.1 spec/models/logistics/core/operation_document_spec.rb