]> source.dussan.org Git - redmine.git/commitdiff
Adds a test for #23346.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 31 Aug 2016 17:08:21 +0000 (17:08 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 31 Aug 2016 17:08:21 +0000 (17:08 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15776 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/account_test.rb

index b1fd3f45ae3798cad9905c45dd5d3e02e084b6e4..b013ad43afef041973daec0ac198598a85157c47 100644 (file)
@@ -142,6 +142,21 @@ class AccountTest < Redmine::IntegrationTest
     assert_redirected_to '/my/password'
   end
 
+  def test_flash_message_should_use_user_language_when_redirecting_user_for_password_change
+    user = User.find_by_login('jsmith')
+    user.must_change_passwd = true
+    user.language = 'it'
+    user.save!
+
+    post '/login', :username => 'jsmith', :password => 'jsmith'
+    assert_redirected_to '/my/page'
+    follow_redirect!
+    assert_redirected_to '/my/password'
+    follow_redirect!
+
+    assert_select 'div.error', :text => /richiesto che sia cambiata/
+  end
+
   def test_user_with_must_change_passwd_should_be_able_to_change_its_password
     User.find_by_login('jsmith').update_attribute :must_change_passwd, true