mirror of
https://github.com/internetee/registry.git
synced 2025-06-04 19:57:29 +02:00
Fix error if domain name was nil.
Used for some old history entries Closes #1663
This commit is contained in:
parent
76e4e32dc9
commit
a0029d0a80
2 changed files with 9 additions and 2 deletions
|
@ -270,6 +270,13 @@ class DomainTest < ActiveSupport::TestCase
|
|||
assert_equal 'shop.test', domain.domain_name.to_s
|
||||
end
|
||||
|
||||
def test_nil_name_doesnt_throw_error
|
||||
domain = Domain.new(name: 'shop.test')
|
||||
assert_nothing_raised do
|
||||
domain.name = nil
|
||||
end
|
||||
end
|
||||
|
||||
def test_returns_registrant_user_domains_by_registrant
|
||||
registrant = contacts(:john).becomes(Registrant)
|
||||
assert_equal registrant, @domain.registrant
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue