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