summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-12-04 00:40:37 +0000
committerGo MAEDA <maeda@farend.jp>2020-12-04 00:40:37 +0000
commit02de3a2156276055578b9c04e8ba410f755d3048 (patch)
tree4639d94dc14266facf458df7914978c408e11016
parentb8eab95e121f6fcd7b2f66b4817e3baf47e46ae4 (diff)
downloadredmine-02de3a2156276055578b9c04e8ba410f755d3048.tar.gz
redmine-02de3a2156276055578b9c04e8ba410f755d3048.zip
Merged r20562 from trunk to 4.1-stable (#33355).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@20563 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/users/edit.html.erb2
-rw-r--r--test/functional/users_controller_test.rb13
2 files changed, 14 insertions, 1 deletions
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index 2a8b6707f..786630869 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -7,7 +7,7 @@
<%=
page_title = title [l(:label_user_plural), users_path], @user.login
- page_title.insert(page_title.rindex(' ') + 1, avatar(@user))
+ page_title.insert(page_title.rindex(' ') + 1, avatar(@user).to_s)
%>
<%= render_tabs user_settings_tabs %>
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index e83cef726..8da207bb0 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -708,6 +708,19 @@ class UsersControllerTest < Redmine::ControllerTest
assert_response 404
end
+ def test_update_with_blank_email_should_not_raise_exception
+ assert_no_difference 'User.count' do
+ with_settings :gravatar_enabled => '1' do
+ put :update, :params => {
+ :id => 2,
+ :user => {:mail => ''}
+ }
+ end
+ end
+ assert_response :success
+ assert_select_error /Email cannot be blank/
+ end
+
def test_destroy
assert_difference 'User.count', -1 do
delete :destroy, :params => {:id => 2}