From 47da73d92b726cb5cd7e63dbeec8f8a501b42b74 Mon Sep 17 00:00:00 2001 From: Markus Kahl Date: Mon, 6 Jan 2014 19:16:11 +0100 Subject: [PATCH] Revert "fixed tests (use project id)" This reverts commit 3e028beaba4788782098f7366e0d4c8aae338eb7. --- test/functional/members_controller_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/functional/members_controller_test.rb b/test/functional/members_controller_test.rb index 6d50857e4e..fe9befcc2f 100644 --- a/test/functional/members_controller_test.rb +++ b/test/functional/members_controller_test.rb @@ -47,7 +47,7 @@ class MembersControllerTest < ActionController::TestCase def test_create assert_difference 'Member.count' do - post :create, :project_id => 1, :member => {:role_ids => [1], :user_id => 7} + post :create, :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)) @@ -55,7 +55,7 @@ class MembersControllerTest < ActionController::TestCase def test_create_multiple assert_difference 'Member.count', 3 do - post :create, :project_id => 1, :member => {:role_ids => [1], :user_ids => [7, 8, 9]} + post :create, :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)) @@ -64,7 +64,7 @@ class MembersControllerTest < ActionController::TestCase context "post :create in JS format" do context "with successful saves" do should "add membership for each user" do - post :create, :format => "js", :project_id => 1, :member => {:role_ids => [1], :user_ids => [7, 8, 9]} + post :create, :format => "js", :id => 1, :member => {:role_ids => [1], :user_ids => [7, 8, 9]} assert User.find(7).member_of?(Project.find(1)) assert User.find(8).member_of?(Project.find(1)) @@ -72,7 +72,7 @@ class MembersControllerTest < ActionController::TestCase end should "replace the tab with RJS" do - post :create, :format => "js", :project_id => 1, :member => {:role_ids => [1], :user_ids => [7, 8, 9]} + post :create, :format => "js", :id => 1, :member => {:role_ids => [1], :user_ids => [7, 8, 9]} assert_select_rjs :replace_html, 'tab-content-members' end @@ -81,13 +81,13 @@ class MembersControllerTest < ActionController::TestCase context "with a failed save" do should "not replace the tab with RJS" do - post :create, :format => "js", :project_id => 1, :member => {:role_ids => [], :user_ids => [7, 8, 9]} + post :create, :format => "js", :id => 1, :member => {:role_ids => [], :user_ids => [7, 8, 9]} assert_select '#tab-content-members', 0 end should "show an error message" do - post :create, :format => "js", :project_id => 1, :member => {:role_ids => [], :user_ids => [7, 8, 9]} + post :create, :format => "js", :id => 1, :member => {:role_ids => [], :user_ids => [7, 8, 9]} assert_select_rjs :insert_html, :top do assert_select '#errorExplanation'