lib/rspec/models/unidom/certificate/china/identity_card_spec.rb in unidom-certificate-china-1.5.3 vs lib/rspec/models/unidom/certificate/china/identity_card_spec.rb in unidom-certificate-china-1.5.4
- old
+ new
@@ -39,8 +39,11 @@
{ identification_number: '1'*identification_number_max_length } => 0,
{ identification_number: 'A'*identification_number_max_length } => 1,
{ identification_number: '1'*(identification_number_max_length+1) } => 2,
{ identification_number: 'A'*(identification_number_max_length+1) } => 2
+ it_behaves_like 'validates text', model_attributes, :name, length: 2..described_class.columns_hash['name'].limit
+ it_behaves_like 'validates text', model_attributes, :address, length: 2..described_class.columns_hash['address'].limit
+
end
end