GitLab steht Mittwoch, den 23. September, zwischen 10:00 und 12:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit 619de813 authored by jplang's avatar jplang

Fixed: Unrelated error message when creating a group with an invalid name (#9795).

git-svn-id: https://svn.redmine.org/redmine/trunk@8231 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 62d1a923
......@@ -51,6 +51,10 @@ class Group < Principal
end
end
def self.human_attribute_name(attribute_key_name, *args)
attribute_key_name == 'lastname' ? l(:field_name) : super
end
private
# Removes references that are not handled by associations
......
......@@ -33,6 +33,12 @@ class GroupTest < ActiveSupport::TestCase
assert g.save
end
def test_blank_name_error_message
g = Group.new
assert !g.save
assert_include "Name can't be blank", g.errors.full_messages
end
def test_roles_given_to_new_user
group = Group.find(11)
user = User.find(9)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment