mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Fixed contact not saving password on create
This commit is contained in:
parent
2f94c0aa38
commit
e7919e3644
2 changed files with 5 additions and 3 deletions
|
@ -124,7 +124,7 @@ class Contact < ActiveRecord::Base
|
|||
}
|
||||
|
||||
contact_hash[:code] = ph[:id] if type == :create
|
||||
|
||||
contact_hash[:auth_info] = ph[:authInfo][:pw] if type == :create
|
||||
contact_hash.delete_if { |_k, v| v.nil? }
|
||||
end
|
||||
|
||||
|
|
|
@ -87,10 +87,12 @@ end
|
|||
|
||||
describe Contact, '.extract_params' do
|
||||
it 'returns params hash'do
|
||||
ph = { id: '123123', email: 'jdoe@example.com', postalInfo: { name: 'fred', addr: { cc: 'EE' } } }
|
||||
ph = { id: '123123', email: 'jdoe@example.com', authInfo: { pw: 'asde' },
|
||||
postalInfo: { name: 'fred', addr: { cc: 'EE' } } }
|
||||
expect(Contact.extract_attributes(ph)).to eq({
|
||||
code: '123123',
|
||||
email: 'jdoe@example.com'
|
||||
email: 'jdoe@example.com',
|
||||
auth_info: 'asde'
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue