Sha256: e36d609cdd4d74d2f85b1765078b7aff717bd740f24a9bd35278fc6b112c068c
Contents?: true
Size: 628 Bytes
Versions: 4
Compression:
Stored size: 628 Bytes
Contents
require 'rails_helper' module Mks module Edm RSpec.describe EquipmentLocation, type: :model do it 'has a valid factory' do expect(create(:equipment_location)).to be_valid end it 'is invalid with no code' do expect(build(:equipment_location, code: nil)).not_to be_valid end it 'is invalid with no name' do expect(build(:equipment_location, name: nil)).not_to be_valid end it 'is invalid with duplicate code' do su = create(:equipment_location) expect(build(:equipment_location, code: su.code)).not_to be_valid end end end end
Version data entries
4 entries across 4 versions & 1 rubygems