##// END OF EJS Templates
Merged r14389 (#20203)....
Jean-Philippe Lang -
r14020:dc724dfc514e
parent child
Show More
@@ -30,7 +30,7
30 30 </fieldset>
31 31
32 32 <div style="float:right;">
33 <%= link_to l(:label_send_test_email), :controller => 'admin', :action => 'test_email' %>
33 <%= link_to l(:label_send_test_email), { :controller => 'admin', :action => 'test_email' }, :method => :post %>
34 34 </div>
35 35
36 36 <%= submit_tag l(:button_save) %>
@@ -308,7 +308,7 RedmineApp::Application.routes.draw do
308 308 match 'admin/projects', :controller => 'admin', :action => 'projects', :via => :get
309 309 match 'admin/plugins', :controller => 'admin', :action => 'plugins', :via => :get
310 310 match 'admin/info', :controller => 'admin', :action => 'info', :via => :get
311 match 'admin/test_email', :controller => 'admin', :action => 'test_email', :via => :get
311 match 'admin/test_email', :controller => 'admin', :action => 'test_email', :via => :post
312 312 match 'admin/default_configuration', :controller => 'admin', :action => 'default_configuration', :via => :post
313 313
314 314 resources :auth_sources do
@@ -87,7 +87,7 class AdminControllerTest < ActionController::TestCase
87 87 user.pref.save!
88 88 ActionMailer::Base.deliveries.clear
89 89
90 get :test_email
90 post :test_email
91 91 assert_redirected_to '/settings?tab=notifications'
92 92 mail = ActionMailer::Base.deliveries.last
93 93 assert_not_nil mail
@@ -97,7 +97,7 class AdminControllerTest < ActionController::TestCase
97 97
98 98 def test_test_email_failure_should_display_the_error
99 99 Mailer.stubs(:test_email).raises(Exception, 'Some error message')
100 get :test_email
100 post :test_email
101 101 assert_redirected_to '/settings?tab=notifications'
102 102 assert_match /Some error message/, flash[:error]
103 103 end
@@ -36,7 +36,7 class RoutingAdminTest < ActionController::IntegrationTest
36 36 { :controller => 'admin', :action => 'info' }
37 37 )
38 38 assert_routing(
39 { :method => 'get', :path => "/admin/test_email" },
39 { :method => 'post', :path => "/admin/test_email" },
40 40 { :controller => 'admin', :action => 'test_email' }
41 41 )
42 42 assert_routing(
General Comments 0
You need to be logged in to leave comments. Login now