summaryrefslogtreecommitdiffstats
path: root/test/functional/wiki_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-05-18 05:56:55 +0000
committerGo MAEDA <maeda@farend.jp>2024-05-18 05:56:55 +0000
commita9518e28b86a330cbbc2cd2c9170e1cd38c458e2 (patch)
tree0a89a098bd85c03c1eeadfd29beb72683afa30a1 /test/functional/wiki_controller_test.rb
parent58e9cd420adad1802d42828c8efedca0e6fed2d1 (diff)
downloadredmine-a9518e28b86a330cbbc2cd2c9170e1cd38c458e2.tar.gz
redmine-a9518e28b86a330cbbc2cd2c9170e1cd38c458e2.zip
Fix RuboCop offense Rails/HttpStatus (#39889).
git-svn-id: https://svn.redmine.org/redmine/trunk@22837 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r--test/functional/wiki_controller_test.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index 31dcf395d..d7e9676f8 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -179,7 +179,7 @@ class WikiControllerTest < Redmine::ControllerTest
def test_show_unexistent_page_without_edit_right
get :show, :params => {:project_id => 1, :id => 'Unexistent page'}
- assert_response 404
+ assert_response :not_found
end
def test_show_unexistent_page_with_edit_right
@@ -191,7 +191,7 @@ class WikiControllerTest < Redmine::ControllerTest
def test_show_specific_version_of_an_unexistent_page_without_edit_right
get :show, :params => {:project_id => 1, :id => 'Unexistent page', :version => 1}
- assert_response 404
+ assert_response :not_found
end
def test_show_unexistent_page_with_parent_should_preselect_parent
@@ -204,14 +204,14 @@ class WikiControllerTest < Redmine::ControllerTest
def test_show_unexistent_version_page
@request.session[:user_id] = 2
get :show, :params => {:project_id => 1, :id => 'CookBook_documentation', :version => 100}
- assert_response 404
+ assert_response :not_found
end
def test_show_should_not_show_history_without_permission
Role.anonymous.remove_permission! :view_wiki_edits
get :show, :params => {:project_id => 1, :id => 'Page with sections', :version => 2}
- assert_response 302
+ assert_response :found
end
def test_show_page_without_content_should_display_the_edit_form
@@ -386,7 +386,7 @@ class WikiControllerTest < Redmine::ControllerTest
@request.session[:user_id] = 2
get :edit, :params => {:project_id => 'ecookbook', :id => 'Page_with_sections', :section => 10}
- assert_response 404
+ assert_response :not_found
end
def test_update_page
@@ -598,7 +598,7 @@ class WikiControllerTest < Redmine::ControllerTest
:id => 'NoContent',
:content => {:text => 'Some content'}
}
- assert_response 302
+ assert_response :found
end
end
assert_equal 'Some content', page.reload.content.text
@@ -780,7 +780,7 @@ class WikiControllerTest < Redmine::ControllerTest
:project_id => 1, :id => 'CookBook_documentation',
:version => '99'
}
- assert_response 404
+ assert_response :not_found
end
def test_diff_with_invalid_version_from_should_respond_with_404
@@ -789,7 +789,7 @@ class WikiControllerTest < Redmine::ControllerTest
:version => '99',
:version_from => '98'
}
- assert_response 404
+ assert_response :not_found
end
def test_annotate
@@ -825,7 +825,7 @@ class WikiControllerTest < Redmine::ControllerTest
:project_id => 1, :id => 'CookBook_documentation',
:version => '99'
}
- assert_response 404
+ assert_response :not_found
end
def test_get_rename
@@ -1040,7 +1040,7 @@ class WikiControllerTest < Redmine::ControllerTest
end
end
end
- assert_response 404
+ assert_response :not_found
end
def test_index
@@ -1097,7 +1097,7 @@ class WikiControllerTest < Redmine::ControllerTest
Role.find_by_name('Manager').remove_permission! :export_wiki_pages
get :export, :params => {:project_id => 'ecookbook'}
- assert_response 403
+ assert_response :forbidden
end
def test_date_index
@@ -1110,7 +1110,7 @@ class WikiControllerTest < Redmine::ControllerTest
def test_not_found
get :show, :params => {:project_id => 999}
- assert_response 404
+ assert_response :not_found
end
def test_protect_page
@@ -1237,7 +1237,7 @@ class WikiControllerTest < Redmine::ControllerTest
# Non members cannot edit protected wiki pages
@request.session[:user_id] = 4
get :edit, :params => {:project_id => 1, :id => 'CookBook_documentation'}
- assert_response 403
+ assert_response :forbidden
end
def test_edit_protected_page_by_member
@@ -1248,7 +1248,7 @@ class WikiControllerTest < Redmine::ControllerTest
def test_history_of_non_existing_page_should_return_404
get :history, :params => {:project_id => 1, :id => 'Unknown_page'}
- assert_response 404
+ assert_response :not_found
end
def test_add_attachment