mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Remove contact's address on domain transfer unless address_processing is enabled
#251
This commit is contained in:
parent
a63e2b9dd2
commit
68c3f0c338
3 changed files with 21 additions and 0 deletions
|
@ -448,4 +448,19 @@ RSpec.describe Contact, db: false do
|
|||
expect(contact.errors).to have_key(:country_code)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#remove_address' do
|
||||
let(:contact) { described_class.new(city: 'test',
|
||||
street: 'test',
|
||||
zip: 'test',
|
||||
country_code: 'test',
|
||||
state: 'test')
|
||||
}
|
||||
subject(:address_removed) { contact.attributes.slice(*described_class.address_attribute_names).compact.empty? }
|
||||
|
||||
it 'removes address attributes' do
|
||||
contact.remove_address
|
||||
expect(address_removed).to be_truthy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue