From: Toshi MARUYAMA Date: Fri, 10 May 2013 04:37:09 +0000 (+0000) Subject: use with_settings at test_get_new_without_default_start_date_is_creation_date of... X-Git-Tag: 2.4.0~382 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=af2053fe13aeb5fdf9b1126962516d2c170f673c;p=redmine.git use with_settings at test_get_new_without_default_start_date_is_creation_date of IssuesControllerTest git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11818 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 586013dd4..5e2af2132 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1562,15 +1562,14 @@ class IssuesControllerTest < ActionController::TestCase end def test_get_new_without_default_start_date_is_creation_date - Setting.default_issue_start_date_to_creation_date = 0 - - @request.session[:user_id] = 2 - get :new, :project_id => 1, :tracker_id => 1 - assert_response :success - assert_template 'new' - - assert_select 'input[name=?]', 'issue[start_date]' - assert_select 'input[name=?][value]', 'issue[start_date]', 0 + with_settings :default_issue_start_date_to_creation_date => 0 do + @request.session[:user_id] = 2 + get :new, :project_id => 1, :tracker_id => 1 + assert_response :success + assert_template 'new' + assert_select 'input[name=?]', 'issue[start_date]' + assert_select 'input[name=?][value]', 'issue[start_date]', 0 + end end def test_get_new_with_default_start_date_is_creation_date