mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
19 lines
505 B
Ruby
19 lines
505 B
Ruby
require 'test_helper'
|
|
|
|
class ContactPostalAddressTest < ActiveSupport::TestCase
|
|
def setup
|
|
@contact = contacts(:john)
|
|
end
|
|
|
|
def test_invalid_if_country_code_is_invalid_and_address_processing_is_on
|
|
Setting.address_processing = true
|
|
@contact.country_code = 'invalid'
|
|
assert @contact.invalid?
|
|
end
|
|
|
|
def test_valid_if_country_code_is_invalid_and_address_processing_is_off
|
|
Setting.address_processing = false
|
|
@contact.country_code = 'invalid'
|
|
assert @contact.valid?
|
|
end
|
|
end
|