mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
Fixed test
This commit is contained in:
parent
b84e9e1579
commit
6bf3819894
1 changed files with 17 additions and 0 deletions
|
@ -22,9 +22,26 @@ class ApiUserTest < ActiveSupport::TestCase
|
||||||
assert another_user.invalid?
|
assert another_user.invalid?
|
||||||
|
|
||||||
another_user.username = 'another'
|
another_user.username = 'another'
|
||||||
|
another_user.identity_code = ''
|
||||||
assert another_user.valid?
|
assert another_user.valid?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_invalid_when_one_registrar_and_identity_code_is_already_taken
|
||||||
|
user = valid_user
|
||||||
|
another_user = user.dup
|
||||||
|
|
||||||
|
assert another_user.invalid?
|
||||||
|
|
||||||
|
another_user.username = 'another'
|
||||||
|
assert another_user.invalid?
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_valid_when_another_registrar_and_identity_code_is_already_taken
|
||||||
|
another_user = valid_user
|
||||||
|
@user.identity_code = another_user.identity_code
|
||||||
|
assert @user.valid?
|
||||||
|
end
|
||||||
|
|
||||||
def test_invalid_without_password
|
def test_invalid_without_password
|
||||||
user = valid_user
|
user = valid_user
|
||||||
user.plain_text_password = ''
|
user.plain_text_password = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue