diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-05-10 10:54:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-05-10 10:54:31 +0000 |
commit | 7dccf9fda6f30d8f4b0c5eaad9f6e2a1e67cd643 (patch) | |
tree | ba6a18abff6ca69af528b3d295263d049a22266f /test/functional/members_controller_test.rb | |
parent | 814e138c2a1105f8d9d10c4362a889dd71aff32d (diff) | |
download | redmine-7dccf9fda6f30d8f4b0c5eaad9f6e2a1e67cd643.tar.gz redmine-7dccf9fda6f30d8f4b0c5eaad9f6e2a1e67cd643.zip |
Allows multiple roles on the same project (#706). Prerequisite for user groups feature.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2726 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/members_controller_test.rb')
-rw-r--r-- | test/functional/members_controller_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/members_controller_test.rb b/test/functional/members_controller_test.rb index efd28a414..2680c3934 100644 --- a/test/functional/members_controller_test.rb +++ b/test/functional/members_controller_test.rb @@ -23,7 +23,7 @@ class MembersController; def rescue_action(e) raise e end; end class MembersControllerTest < Test::Unit::TestCase - fixtures :projects, :members, :roles, :users + fixtures :projects, :members, :member_roles, :roles, :users def setup @controller = MembersController.new @@ -42,7 +42,7 @@ class MembersControllerTest < Test::Unit::TestCase def test_create assert_difference 'Member.count' do - post :new, :id => 1, :member => {:role_id => 1, :user_id => 7} + post :new, :id => 1, :member => {:role_ids => [1], :user_id => 7} end assert_redirected_to '/projects/ecookbook/settings/members' assert User.find(7).member_of?(Project.find(1)) @@ -50,7 +50,7 @@ class MembersControllerTest < Test::Unit::TestCase def test_create_by_user_login assert_difference 'Member.count' do - post :new, :id => 1, :member => {:role_id => 1, :user_login => 'someone'} + post :new, :id => 1, :member => {:role_ids => [1], :user_login => 'someone'} end assert_redirected_to '/projects/ecookbook/settings/members' assert User.find(7).member_of?(Project.find(1)) @@ -58,7 +58,7 @@ class MembersControllerTest < Test::Unit::TestCase def test_create_multiple assert_difference 'Member.count', 3 do - post :new, :id => 1, :member => {:role_id => 1, :user_ids => [7, 8, 9]} + post :new, :id => 1, :member => {:role_ids => [1], :user_ids => [7, 8, 9]} end assert_redirected_to '/projects/ecookbook/settings/members' assert User.find(7).member_of?(Project.find(1)) @@ -66,7 +66,7 @@ class MembersControllerTest < Test::Unit::TestCase def test_edit assert_no_difference 'Member.count' do - post :edit, :id => 2, :member => {:role_id => 1, :user_id => 3} + post :edit, :id => 2, :member => {:role_ids => [1], :user_id => 3} end assert_redirected_to '/projects/ecookbook/settings/members' end |