use set_language_if_valid instead of I18n.locale at unit group test (#9795)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8235 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b99c2f4dee
commit
2e6b13a5e9
|
@ -28,14 +28,15 @@ class GroupTest < ActiveSupport::TestCase
|
||||||
:workflows,
|
:workflows,
|
||||||
:groups_users
|
:groups_users
|
||||||
|
|
||||||
|
include Redmine::I18n
|
||||||
|
|
||||||
def test_create
|
def test_create
|
||||||
g = Group.new(:lastname => 'New group')
|
g = Group.new(:lastname => 'New group')
|
||||||
assert g.save
|
assert g.save
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_blank_name_error_message
|
def test_blank_name_error_message
|
||||||
I18n.locale = :en
|
set_language_if_valid 'en'
|
||||||
|
|
||||||
g = Group.new
|
g = Group.new
|
||||||
assert !g.save
|
assert !g.save
|
||||||
assert_include "Name can't be blank", g.errors.full_messages
|
assert_include "Name can't be blank", g.errors.full_messages
|
||||||
|
|
Loading…
Reference in New Issue