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