Sha256: 4e71910ecf2eb918e3fc323fa5ae3e1055de31779780652b6097a04c68c5e27f
Contents?: true
Size: 615 Bytes
Versions: 5
Compression:
Stored size: 615 Bytes
Contents
require 'rails_helper' module Mks module Rate RSpec.describe UnitOfCharge, type: :model do it 'has valid factory' do expect(build(:unit_of_charge)).to be_valid end it 'is invalid without name' do expect(build(:unit_of_charge, name: nil)).not_to be_valid end it 'is invalid without unit variables' do expect(build(:unit_of_charge, unit_variables: {})).not_to be_valid end it 'can not have same name' do uoc = create(:unit_of_charge) expect(build(:unit_of_charge, name: uoc.name)).not_to be_valid end end end end
Version data entries
5 entries across 5 versions & 1 rubygems