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