Sha256: 01d41e05ef9e44391dce97ef200491ac6814b5631381ecd70cf2fadb94ba69d9
Contents?: true
Size: 744 Bytes
Versions: 5
Compression:
Stored size: 744 Bytes
Contents
require 'rails_helper' module Mks module Rate RSpec.describe ServiceBundle, type: :model do it 'has a valid factory' do expect(create(:service_bundle)).to be_valid end it 'is invalid with no code' do expect(build(:service_bundle, code: nil)).not_to be_valid end it 'is invalid with no name' do expect(build(:service_bundle, name: nil)).not_to be_valid end it 'is invalid with no percent discount' do expect(build(:service_bundle, percent_discount: nil)).not_to be_valid end it 'is invalid with duplicate code' do sb = create(:service_bundle) expect(build(:service_bundle, code: sb.code)).not_to be_valid end end end end
Version data entries
5 entries across 5 versions & 1 rubygems