mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Add test for registrar address
This commit is contained in:
parent
39ea06ab17
commit
28e436e4f6
2 changed files with 5 additions and 1 deletions
|
@ -23,7 +23,7 @@ class Registrar < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def address
|
def address
|
||||||
[street, city, state, city].reject(&:empty?).compact.join(', ')
|
[street, city, state, zip].reject(&:empty?).compact.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
|
|
|
@ -55,5 +55,9 @@ describe Registrar do
|
||||||
@registrar.versions.size.should == 1
|
@registrar.versions.size.should == 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fit 'should return full address' do
|
||||||
|
@registrar.address.should == 'Street 999, Town, County, Postal'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue