mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
Refactored contact attribute assignment
This commit is contained in:
parent
5b91acb343
commit
6bcf508fac
7 changed files with 94 additions and 33 deletions
|
@ -65,6 +65,18 @@ describe Contact, '#upID' do
|
|||
end
|
||||
|
||||
|
||||
describe Contact, '.extract_params' do
|
||||
it 'returns params hash'do
|
||||
ph = { id: '123123', email: 'jdoe@example.com', postalInfo: { name: "fred", addr: { cc: 'EE' } } }
|
||||
expect(Contact.extract_attributes(ph)).to eq( {
|
||||
code: '123123',
|
||||
email: 'jdoe@example.com',
|
||||
name: 'fred'
|
||||
} )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe Contact, '.check_availability' do
|
||||
|
||||
before(:each) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue