summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-06 20:46:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-06 20:46:22 +0000
commit072c4ad14cf0649545ceab6261558a32c234e720 (patch)
tree22a1b4bbd76f0ef4eda852e971cb5e24bf2bcb92 /test/functional
parent9fb770ba503b3dfe1fe48794e1b7042c5e26d8d7 (diff)
downloadredmine-072c4ad14cf0649545ceab6261558a32c234e720.tar.gz
redmine-072c4ad14cf0649545ceab6261558a32c234e720.zip
Verify HTTP method on ProjectsController#create.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4646 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/projects_controller_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index d3a12f290..0b77daa50 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -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