mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
Make email address voluntary in preferences; update tests to handle the added email field better
This commit is contained in:
parent
f9f7e6b9ea
commit
efee4976b0
5 changed files with 71 additions and 21 deletions
|
|
@ -89,6 +89,19 @@ class UserTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_validate_correct_email
|
||||
assert_difference 'User.count' do
|
||||
create_user :email=> 'testi@example.org'
|
||||
end
|
||||
end
|
||||
|
||||
def test_validate_email_format
|
||||
assert_no_difference 'User.count' do
|
||||
u = create_user :email=> 'test'
|
||||
assert_equal "is not valid", u.errors[:email]
|
||||
end
|
||||
end
|
||||
|
||||
def test_display_name_with_first_and_last_name_set
|
||||
@other_user.first_name = "Jane"
|
||||
@other_user.last_name = "Doe"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue