lib/rspec/models/unidom/certificate/china/identity_card_spec.rb in unidom-certificate-china-1.5.4 vs lib/rspec/models/unidom/certificate/china/identity_card_spec.rb in unidom-certificate-china-1.5.5

- old
+ new

@@ -18,14 +18,14 @@ issuing_authority_name: 'Some City PS Department', validity_from_date: Date.current-10.years, validity_thru_date: Date.current+10.years } - identification_number_max_length = described_class.columns_hash['identification_number'].limit + it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes + it_behaves_like 'Unidom::Certificate::Concerns::AsCertification', model_attributes - it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes - + identification_number_max_length = described_class.columns_hash['identification_number'].limit it_behaves_like 'validates', model_attributes, :identification_number, { } => 0, { identification_number: nil } => 3, { identification_number: '' } => 3, { identification_number: '1' } => 2, @@ -39,11 +39,13 @@ { 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 + 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