Rubocop style fixes

This commit is contained in:
Andres Keskküla 2015-01-09 09:43:57 +02:00
parent ea7a6a5238
commit d57eac8f98
2 changed files with 4 additions and 4 deletions

View file

@ -111,7 +111,7 @@ module Epp::ContactsHelper
## SHARED ## SHARED
def find_contact(eager_load=nil) def find_contact(eager_load = nil)
if eager_load if eager_load
contact = Contact.includes(address: :country).find_by(code: @ph[:id]) contact = Contact.includes(address: :country).find_by(code: @ph[:id])
else else

View file

@ -18,11 +18,11 @@ describe Contact do
end end
it 'validates birthday' do it 'validates birthday' do
invalid = [ '123' '12/12/2012', 'aaaa', '12/12/12', '02-11-1999' ] invalid = ['123' '12/12/2012', 'aaaa', '12/12/12', '02-11-1999']
invalid.each do |date| invalid.each do |date|
expect(Fabricate.build(:contact, ident_type: 'birthday', ident: date).valid?).to be false expect(Fabricate.build(:contact, ident_type: 'birthday', ident: date).valid?).to be false
end end
valid = [ '2012-12-11', '1990-02-16' ] valid = ['2012-12-11', '1990-02-16']
valid.each do |date| valid.each do |date|
expect(Fabricate.build(:contact, ident_type: 'birthday', ident: date).valid?).to be true expect(Fabricate.build(:contact, ident_type: 'birthday', ident: date).valid?).to be true
end end