Additional email addresses are not displayed in user profile page (#33601).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@19836 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-06-27 05:43:42 +00:00
parent c1be4e3ec4
commit fc3c4abc12
3 changed files with 21 additions and 1 deletions

View File

@@ -255,6 +255,20 @@ class UsersControllerTest < Redmine::ControllerTest
end
end
def test_show_should_list_all_emails
EmailAddress.create!(user_id: 3, address: 'dlopper@example.net')
EmailAddress.create!(user_id: 3, address: 'dlopper@example.org')
@request.session[:user_id] = 1
get :show, params: {id: 3}
assert_select 'li', text: /Email:/ do
assert_select 'a:nth-of-type(1)', text: 'dlopper@somenet.foo'
assert_select 'a:nth-of-type(2)', text: 'dlopper@example.net'
assert_select 'a:nth-of-type(3)', text: 'dlopper@example.org'
end
end
def test_new
get :new
assert_response :success