Removes all #verify calls in controllers. Verification is handled at routing level now that the default route is removed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9061 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -2138,20 +2138,6 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
assert_equal 'This is the test_new issue', issue.subject
|
||||
end
|
||||
|
||||
def test_update_using_invalid_http_verbs
|
||||
@request.session[:user_id] = 2
|
||||
subject = 'Updated by an invalid http verb'
|
||||
|
||||
get :update, :id => 1, :issue => {:subject => subject}
|
||||
assert_not_equal subject, Issue.find(1).subject
|
||||
|
||||
post :update, :id => 1, :issue => {:subject => subject}
|
||||
assert_not_equal subject, Issue.find(1).subject
|
||||
|
||||
delete :update, :id => 1, :issue => {:subject => subject}
|
||||
assert_not_equal subject, Issue.find(1).subject
|
||||
end
|
||||
|
||||
def test_put_update_without_custom_fields_param
|
||||
@request.session[:user_id] = 2
|
||||
ActionMailer::Base.deliveries.clear
|
||||
|
||||
@@ -311,12 +311,6 @@ class ProjectsControllerTest < ActionController::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_create_should_not_accept_get
|
||||
@request.session[:user_id] = 1
|
||||
get :create
|
||||
assert_response :method_not_allowed
|
||||
end
|
||||
|
||||
def test_show_by_id
|
||||
get :show, :id => 1
|
||||
assert_response :success
|
||||
@@ -412,12 +406,6 @@ class ProjectsControllerTest < ActionController::TestCase
|
||||
assert_equal ['documents', 'issue_tracking', 'repository'], Project.find(1).enabled_module_names.sort
|
||||
end
|
||||
|
||||
def test_modules_should_not_allow_get
|
||||
@request.session[:user_id] = 1
|
||||
get :modules, :id => 1
|
||||
assert_response :method_not_allowed
|
||||
end
|
||||
|
||||
def test_destroy_without_confirmation
|
||||
@request.session[:user_id] = 1 # admin
|
||||
delete :destroy, :id => 1
|
||||
|
||||
@@ -289,13 +289,6 @@ class UsersControllerTest < ActionController::TestCase
|
||||
assert_nil User.find_by_id(2)
|
||||
end
|
||||
|
||||
def test_destroy_should_not_accept_get_requests
|
||||
assert_no_difference 'User.count' do
|
||||
get :destroy, :id => 2
|
||||
end
|
||||
assert_response 405
|
||||
end
|
||||
|
||||
def test_destroy_should_be_denied_for_non_admin_users
|
||||
@request.session[:user_id] = 3
|
||||
|
||||
|
||||
@@ -32,12 +32,6 @@ class WatchersControllerTest < ActionController::TestCase
|
||||
User.current = nil
|
||||
end
|
||||
|
||||
def test_get_watch_should_be_invalid
|
||||
@request.session[:user_id] = 3
|
||||
get :watch, :object_type => 'issue', :object_id => '1'
|
||||
assert_response 405
|
||||
end
|
||||
|
||||
def test_watch
|
||||
@request.session[:user_id] = 3
|
||||
assert_difference('Watcher.count') do
|
||||
|
||||
Reference in New Issue
Block a user