mirror of
https://github.com/redmine/redmine.git
synced 2026-05-05 21:35:30 +02:00
Use Rails 5 syntax for functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@16585 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -43,13 +43,18 @@ class AdminControllerTest < Redmine::ControllerTest
|
||||
end
|
||||
|
||||
def test_projects_with_status_filter
|
||||
get :projects, :status => 1
|
||||
get :projects, :params => {
|
||||
:status => 1
|
||||
}
|
||||
assert_response :success
|
||||
assert_select 'tr.project.closed', 0
|
||||
end
|
||||
|
||||
def test_projects_with_name_filter
|
||||
get :projects, :name => 'store', :status => ''
|
||||
get :projects, :params => {
|
||||
:name => 'store',
|
||||
:status => ''
|
||||
}
|
||||
assert_response :success
|
||||
|
||||
assert_select 'tr.project td.name', :text => 'OnlineStore'
|
||||
@@ -58,7 +63,9 @@ class AdminControllerTest < Redmine::ControllerTest
|
||||
|
||||
def test_load_default_configuration_data
|
||||
delete_configuration_data
|
||||
post :default_configuration, :lang => 'fr'
|
||||
post :default_configuration, :params => {
|
||||
:lang => 'fr'
|
||||
}
|
||||
assert_response :redirect
|
||||
assert_nil flash[:error]
|
||||
assert IssueStatus.find_by_name('Nouveau')
|
||||
@@ -67,7 +74,9 @@ class AdminControllerTest < Redmine::ControllerTest
|
||||
def test_load_default_configuration_data_should_rescue_error
|
||||
delete_configuration_data
|
||||
Redmine::DefaultData::Loader.stubs(:load).raises(Exception.new("Something went wrong"))
|
||||
post :default_configuration, :lang => 'fr'
|
||||
post :default_configuration, :params => {
|
||||
:lang => 'fr'
|
||||
}
|
||||
assert_response :redirect
|
||||
assert_not_nil flash[:error]
|
||||
assert_match /Something went wrong/, flash[:error]
|
||||
|
||||
Reference in New Issue
Block a user