Sha256: 5b69106d59d8158de0aeb07f7742f2d625ca69d9a6b7858aff67faf5853a08da
Contents?: true
Size: 910 Bytes
Versions: 2
Compression:
Stored size: 910 Bytes
Contents
describe Unidom::Party::Company, type: :model do before :each do end after :each do end context do model_attributes = { name: 'Tesla' } name_max_length = described_class.columns_hash['name'].limit it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes it_behaves_like 'validates', model_attributes, :name, { } => 0, { name: nil } => 2, { name: '' } => 2, { name: '1' } => 1, { name: 'A' } => 1, { name: '11' } => 0, { name: 'AA' } => 0, { name: '111' } => 0, { name: 'AAA' } => 0, { name: '1'*(name_max_length-1) } => 0, { name: 'A'*(name_max_length-1) } => 0, { name: '1'*name_max_length } => 0, { name: 'A'*name_max_length } => 0, { name: '1'*(name_max_length+1) } => 1, { name: 'A'*(name_max_length+1) } => 1 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
unidom-party-1.9.3 | lib/rspec/models/unidom/party/company_spec.rb |
unidom-party-1.9.2 | lib/rspec/models/unidom/party/company_spec.rb |