Sha256: d13ab9bafcc746e47de51f34116469b2857600b70aefb3ab381de7e0207293c5
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 KB
Contents
describe Unidom::Party::GovernmentAgency, type: :model do before :each do end after :each do end context do model_attributes = { supervision_region_id: SecureRandom.uuid, supervision_region_type: 'Unidom::Party::SupervisionRegion::Mock', name: 'WalMart', function_code: 'ZZZZ' } 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/government_agency_spec.rb |
unidom-party-1.9.2 | lib/rspec/models/unidom/party/government_agency_spec.rb |