Verify HTTP method on ProjectsController#create.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4646 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-01-06 20:46:22 +00:00
parent 9fb770ba50
commit 072c4ad14c
2 changed files with 14 additions and 3 deletions

View File

@@ -288,6 +288,17 @@ class ProjectsControllerTest < ActionController::TestCase
end
end
context "GET :create" do
setup do
@request.session[:user_id] = 1
end
should "not be allowed" do
get :create
assert_response :method_not_allowed
end
end
def test_show_by_id
get :show, :id => 1
assert_response :success