Sha256: cbf5e700239103d1a0255943c8650e80ef2bd5d2b22cb63b5a04f4c9a8191eea
Contents?: true
Size: 671 Bytes
Versions: 5
Compression:
Stored size: 671 Bytes
Contents
require 'rails_helper' module Mks module Rate RSpec.describe ServiceDeliveryUnit, type: :model do it 'has valid factory' do expect(create(:service_delivery_unit)).to be_valid end it 'is invalid without code' do expect(build(:service_delivery_unit, code: nil)).not_to be_valid end it 'is invalid without name' do expect(build(:service_delivery_unit, name: nil)).not_to be_valid end it 'can not have two service delivery units with same code' do sdu = create(:service_delivery_unit) expect(build(:service_delivery_unit, code: sdu.code)).not_to be_valid end end end end
Version data entries
5 entries across 5 versions & 1 rubygems