Add test for registrar address

This commit is contained in:
Martin Lensment 2015-02-03 17:12:00 +02:00
parent 39ea06ab17
commit 28e436e4f6
2 changed files with 5 additions and 1 deletions

View file

@ -23,7 +23,7 @@ class Registrar < ActiveRecord::Base
end
def address
[street, city, state, city].reject(&:empty?).compact.join(', ')
[street, city, state, zip].reject(&:empty?).compact.join(', ')
end
def to_s

View file

@ -55,5 +55,9 @@ describe Registrar do
@registrar.versions.size.should == 1
end
end
fit 'should return full address' do
@registrar.address.should == 'Street 999, Town, County, Postal'
end
end
end