diff options
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 |