Sha256: e5360a778a04868e88b96f953a8b07f786e045836daf8f40895fc857ba806d8d
Contents?: true
Size: 621 Bytes
Versions: 9
Compression:
Stored size: 621 Bytes
Contents
require 'rails_helper' module Logistics module Core RSpec.describe DeliveryTerm, type: :model do it 'has a valid factory' do expect(create(:delivery_term)).to be_valid end it 'is invalid with no code' do expect(build(:delivery_term, :code => '')).not_to be_valid end it 'is invalid with no name' do expect(build(:delivery_term, :name => nil)).not_to be_valid end it 'is invalid with duplicate code' do lookup = create(:delivery_term) expect(build(:delivery_term, :code => lookup.code)).not_to be_valid end end end end
Version data entries
9 entries across 9 versions & 1 rubygems