diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-31 17:32:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-31 17:32:34 +0000 |
commit | b834e81d7f41121fc6d9bef95ee090f8f466493e (patch) | |
tree | 61fddb6214c64e96fddd504301029bdb382ba439 /test/functional/wiki_controller_test.rb | |
parent | 1d4300b674f739d671a8be22d3ea617922f16517 (diff) | |
download | redmine-b834e81d7f41121fc6d9bef95ee090f8f466493e.tar.gz redmine-b834e81d7f41121fc6d9bef95ee090f8f466493e.zip |
Use Rails 5 syntax for functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@16585 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 1cc0a3b7d..8931b4ec7 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -188,7 +188,7 @@ class WikiControllerTest < Redmine::ControllerTest def test_get_new_xhr @request.session[:user_id] = 2 - xhr :get, :new, :params => {:project_id => 'ecookbook'} + get :new, :params => {:project_id => 'ecookbook'}, :xhr => true assert_response :success assert_include 'Unallowed characters', response.body end @@ -203,7 +203,7 @@ class WikiControllerTest < Redmine::ControllerTest def test_post_new_xhr_with_valid_title_should_redirect_to_edit @request.session[:user_id] = 2 - xhr :post, :new, :params => {:project_id => 'ecookbook', :title => 'New Page'} + post :new, :params => {:project_id => 'ecookbook', :title => 'New Page'}, :xhr => true assert_response :success assert_equal 'window.location = "/projects/ecookbook/wiki/New_Page"', response.body end @@ -228,7 +228,7 @@ class WikiControllerTest < Redmine::ControllerTest def test_post_new_xhr_with_invalid_title_should_display_errors @request.session[:user_id] = 2 - xhr :post, :new, :params => {:project_id => 'ecookbook', :title => 'Another page'} + post :new, :params => {:project_id => 'ecookbook', :title => 'Another page'}, :xhr => true assert_response :success assert_include 'Title has already been taken', response.body end @@ -581,7 +581,7 @@ class WikiControllerTest < Redmine::ControllerTest def test_preview @request.session[:user_id] = 2 - xhr :post, :preview, :params => { + post :preview, :params => { :project_id => 1, :id => 'CookBook_documentation', :content => { @@ -589,14 +589,14 @@ class WikiControllerTest < Redmine::ControllerTest :text => 'this is a *previewed text*', :version => 3 } - } + }, :xhr => true assert_response :success assert_select 'strong', :text => /previewed text/ end def test_preview_new_page @request.session[:user_id] = 2 - xhr :post, :preview, :params => { + post :preview, :params => { :project_id => 1, :id => 'New page', :content => { @@ -604,7 +604,7 @@ class WikiControllerTest < Redmine::ControllerTest :comments => '', :version => 0 } - } + }, :xhr => true assert_response :success assert_select 'h1', :text => /New page/ end |