mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
Replaced address with local and international addr
This commit is contained in:
parent
fe54f327d9
commit
2655da4555
16 changed files with 208 additions and 57 deletions
|
@ -10,11 +10,14 @@ describe Address, '.extract_params' do
|
|||
it 'returns params hash'do
|
||||
Fabricate(:country, iso:'EE')
|
||||
ph = { postalInfo: { name: "fred", addr: { cc: 'EE', city: 'Village', street: [ 'street1', 'street2' ] } } }
|
||||
expect(Address.extract_attributes(ph[:postalInfo][:addr])).to eq( {
|
||||
city: 'Village',
|
||||
country_id: 1,
|
||||
street: 'street1',
|
||||
street2: 'street2'
|
||||
expect(Address.extract_attributes(ph[:postalInfo])).to eq( {
|
||||
international_address_attributes: {
|
||||
name: 'fred',
|
||||
city: 'Village',
|
||||
country_id: 1,
|
||||
street: 'street1',
|
||||
street2: 'street2',
|
||||
}
|
||||
} )
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue