Mercurial > hg > soundsoftware-site
diff test/functional/auth_sources_controller_test.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children |
line wrap: on
line diff
--- a/test/functional/auth_sources_controller_test.rb Tue Sep 09 09:28:31 2014 +0100 +++ b/test/functional/auth_sources_controller_test.rb Tue Sep 09 09:29:00 2014 +0100 @@ -68,11 +68,13 @@ def test_create_with_failure assert_no_difference 'AuthSourceLdap.count' do - post :create, :type => 'AuthSourceLdap', :auth_source => {:name => 'Test', :host => '', :port => '389', :attr_login => 'cn'} + post :create, :type => 'AuthSourceLdap', + :auth_source => {:name => 'Test', :host => '', + :port => '389', :attr_login => 'cn'} assert_response :success assert_template 'new' end - assert_error_tag :content => /host can't be blank/i + assert_error_tag :content => /host #{ESCAPED_CANT} be blank/i end def test_edit @@ -101,19 +103,22 @@ end def test_update - put :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '192.168.0.10', :port => '389', :attr_login => 'uid'} + put :update, :id => 1, + :auth_source => {:name => 'Renamed', :host => '192.168.0.10', + :port => '389', :attr_login => 'uid'} assert_redirected_to '/auth_sources' - source = AuthSourceLdap.find(1) assert_equal 'Renamed', source.name assert_equal '192.168.0.10', source.host end def test_update_with_failure - put :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '', :port => '389', :attr_login => 'uid'} + put :update, :id => 1, + :auth_source => {:name => 'Renamed', :host => '', + :port => '389', :attr_login => 'uid'} assert_response :success assert_template 'edit' - assert_error_tag :content => /host can't be blank/i + assert_error_tag :content => /host #{ESCAPED_CANT} be blank/i end def test_destroy