Sha256: 821648174cafde298ac0d24a2b1219a1b7e08a09c769f8ae7dbaa8cc599079fd

Contents?: true

Size: 588 Bytes

Versions: 9

Compression:

Stored size: 588 Bytes

Contents

require 'rails_helper'

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

			it 'is invalid with no selling rate' do
        expect(build(:currency_rate, rate_to_base_selling: nil)).not_to be_valid
      end

      it 'is invalid with no rate date' do
        expect(build(:currency_rate, rate_date: nil)).not_to be_valid
      end

      it 'is invalid with no currency' do
        expect(build(:currency_rate, currency: 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/currency_rate_spec.rb
logistics_core-21.11.1 spec/models/logistics/core/currency_rate_spec.rb
logistics_core-21.08.1 spec/models/logistics/core/currency_rate_spec.rb
logistics_core-21.03.1 spec/models/logistics/core/currency_rate_spec.rb
logistics_core-20.10.3 spec/models/logistics/core/currency_rate_spec.rb
logistics_core-20.10.2 spec/models/logistics/core/currency_rate_spec.rb
logistics_core-20.10.1 spec/models/logistics/core/currency_rate_spec.rb
logistics_core-20.9.1 spec/models/logistics/core/currency_rate_spec.rb
logistics_core-20.8.1 spec/models/logistics/core/currency_rate_spec.rb