mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 04:07:33 +02:00
added tests for disputed and admin_user models
This commit is contained in:
parent
ad391e1b8c
commit
3877c11d4d
2 changed files with 23 additions and 0 deletions
|
@ -123,6 +123,15 @@ class AdminUserTest < ActiveSupport::TestCase
|
|||
assert user.valid?
|
||||
end
|
||||
|
||||
def test_min_password_length
|
||||
assert_equal AdminUser.min_password_length, 8
|
||||
end
|
||||
|
||||
def test_country_instance
|
||||
user = valid_user
|
||||
assert user.country.present?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def valid_user
|
||||
|
|
|
@ -16,6 +16,20 @@ class DisputedDomainTest < ActiveSupport::TestCase
|
|||
@dispute.reload
|
||||
|
||||
assert @dispute.closed
|
||||
assert @dispute.forward_to_auction_if_possible
|
||||
|
||||
n = Whois::Record.find_by(name: @dispute.domain_name)
|
||||
assert @dispute.remove_whois_data(n)
|
||||
end
|
||||
|
||||
def test_invalid_auth
|
||||
travel_to Time.zone.parse('2010-10-05')
|
||||
assert_not Dispute.valid_auth?(nil, nil)
|
||||
end
|
||||
|
||||
def test_valid_auth
|
||||
travel_to Time.zone.parse('2010-10-05')
|
||||
assert Dispute.valid_auth?(@dispute.domain_name, @dispute.password)
|
||||
end
|
||||
|
||||
def test_syncs_password_to_reserved
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue