summaryrefslogtreecommitdiffstats
path: root/redmine/test/functional/projects_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'redmine/test/functional/projects_controller_test.rb')
-rw-r--r--redmine/test/functional/projects_controller_test.rb75
1 files changed, 17 insertions, 58 deletions
diff --git a/redmine/test/functional/projects_controller_test.rb b/redmine/test/functional/projects_controller_test.rb
index 8da34ec7e..23776ed90 100644
--- a/redmine/test/functional/projects_controller_test.rb
+++ b/redmine/test/functional/projects_controller_test.rb
@@ -1,3 +1,20 @@
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
require File.dirname(__FILE__) + '/../test_helper'
require 'projects_controller'
@@ -27,62 +44,4 @@ class ProjectsControllerTest < Test::Unit::TestCase
assert_not_nil assigns(:projects)
end
-
- def test_show
- get :show, :id => 1
-
- assert_response :success
- assert_template 'show'
-
- assert_not_nil assigns(:project)
- assert assigns(:project).valid?
- end
-
- def test_new
- get :new
-
- assert_response :success
- assert_template 'new'
-
- assert_not_nil assigns(:project)
- end
-
- def test_create
- num_projects = Project.count
-
- post :create, :project => {}
-
- assert_response :redirect
- assert_redirected_to :action => 'list'
-
- assert_equal num_projects + 1, Project.count
- end
-
- def test_edit
- get :edit, :id => 1
-
- assert_response :success
- assert_template 'edit'
-
- assert_not_nil assigns(:project)
- assert assigns(:project).valid?
- end
-
- def test_update
- post :update, :id => 1
- assert_response :redirect
- assert_redirected_to :action => 'show', :id => 1
- end
-
- def test_destroy
- assert_not_nil Project.find(1)
-
- post :destroy, :id => 1
- assert_response :redirect
- assert_redirected_to :action => 'list'
-
- assert_raise(ActiveRecord::RecordNotFound) {
- Project.find(1)
- }
- end
end