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