mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
parent
5716016192
commit
340e61804b
5 changed files with 40 additions and 32 deletions
|
@ -5,6 +5,26 @@ class DomainTest < ActiveSupport::TestCase
|
|||
@domain = domains(:shop)
|
||||
end
|
||||
|
||||
def test_validates
|
||||
assert @domain.valid?
|
||||
end
|
||||
|
||||
def test_generates_random_auth_info_if_new
|
||||
domain = Domain.new
|
||||
another_domain = Domain.new
|
||||
|
||||
refute_empty domain.auth_info
|
||||
refute_empty another_domain.auth_info
|
||||
refute_equal domain.auth_info, another_domain.auth_info
|
||||
end
|
||||
|
||||
def test_does_not_regenerate_auth_info_if_persisted
|
||||
original_auth_info = @domain.auth_info
|
||||
@domain.save!
|
||||
@domain.reload
|
||||
assert_equal original_auth_info, @domain.auth_info
|
||||
end
|
||||
|
||||
def test_transfers_domain
|
||||
old_auth_info = @domain.auth_info
|
||||
new_registrar = registrars(:goodnames)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue