summaryrefslogtreecommitdiffstats
path: root/test/functional/projects_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-12 13:19:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-12 13:19:07 +0000
commita4d7a99c22d9aac89a38c1cb411158777b72bb9d (patch)
tree12a6f4f752208ca050a899b0599d290d85c2f87f /test/functional/projects_controller_test.rb
parent3409333522a76ade39db41124df596b2b95eccc0 (diff)
downloadredmine-a4d7a99c22d9aac89a38c1cb411158777b72bb9d.tar.gz
redmine-a4d7a99c22d9aac89a38c1cb411158777b72bb9d.zip
Declare safe attributes for User and Projects models.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4492 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/projects_controller_test.rb')
-rw-r--r--test/functional/projects_controller_test.rb20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index 3cd7c3dbf..5392ffb12 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -144,19 +144,27 @@ class ProjectsControllerTest < ActionController::TestCase
end
should "create a new project" do
- post :create, :project => { :name => "blog",
- :description => "weblog",
- :identifier => "blog",
- :is_public => 1,
- :custom_field_values => { '3' => 'Beta' }
- }
+ post :create,
+ :project => {
+ :name => "blog",
+ :description => "weblog",
+ :homepage => 'http://weblog',
+ :identifier => "blog",
+ :is_public => 1,
+ :custom_field_values => { '3' => 'Beta' },
+ :tracker_ids => ['1', '3']
+ }
assert_redirected_to '/projects/blog/settings'
project = Project.find_by_name('blog')
assert_kind_of Project, project
+ assert project.active?
assert_equal 'weblog', project.description
+ assert_equal 'http://weblog', project.homepage
assert_equal true, project.is_public?
assert_nil project.parent
+ assert_equal 'Beta', project.custom_value_for(3).value
+ assert_equal [1, 3], project.trackers.map(&:id).sort
end
should "create a new subproject" do