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