summaryrefslogtreecommitdiffstats
path: root/test/functional/groups_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-23 21:46:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-23 21:46:40 +0000
commitc2e73160daa7782d7a91f2b6a974a936c6f084da (patch)
tree62e174df69aba43cb5a84f2ddd278dc4562963f0 /test/functional/groups_controller_test.rb
parentca5946d82ebb96464a3d283be657bc24ce0c47f1 (diff)
downloadredmine-c2e73160daa7782d7a91f2b6a974a936c6f084da.tar.gz
redmine-c2e73160daa7782d7a91f2b6a974a936c6f084da.zip
Adds a single controller for users and groups memberships and support for adding multiple projects at once (#11702).
git-svn-id: http://svn.redmine.org/redmine/trunk@13498 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/groups_controller_test.rb')
-rw-r--r--test/functional/groups_controller_test.rb56
1 files changed, 0 insertions, 56 deletions
diff --git a/test/functional/groups_controller_test.rb b/test/functional/groups_controller_test.rb
index d1a2b6729..778b3f3cd 100644
--- a/test/functional/groups_controller_test.rb
+++ b/test/functional/groups_controller_test.rb
@@ -144,62 +144,6 @@ class GroupsControllerTest < ActionController::TestCase
end
end
- def test_new_membership
- assert_difference 'Group.find(10).members.count' do
- post :edit_membership, :id => 10, :membership => { :project_id => 2, :role_ids => ['1', '2']}
- end
- end
-
- def test_xhr_new_membership
- assert_difference 'Group.find(10).members.count' do
- xhr :post, :edit_membership, :id => 10, :membership => { :project_id => 2, :role_ids => ['1', '2']}
- assert_response :success
- assert_template 'edit_membership'
- assert_equal 'text/javascript', response.content_type
- end
- assert_match /OnlineStore/, response.body
- end
-
- def test_xhr_new_membership_with_failure
- assert_no_difference 'Group.find(10).members.count' do
- xhr :post, :edit_membership, :id => 10, :membership => { :project_id => 999, :role_ids => ['1', '2']}
- assert_response :success
- assert_template 'edit_membership'
- assert_equal 'text/javascript', response.content_type
- end
- assert_match /alert/, response.body, "Alert message not sent"
- end
-
- def test_edit_membership
- assert_no_difference 'Group.find(10).members.count' do
- post :edit_membership, :id => 10, :membership_id => 6, :membership => { :role_ids => ['1', '3']}
- end
- end
-
- def test_xhr_edit_membership
- assert_no_difference 'Group.find(10).members.count' do
- xhr :post, :edit_membership, :id => 10, :membership_id => 6, :membership => { :role_ids => ['1', '3']}
- assert_response :success
- assert_template 'edit_membership'
- assert_equal 'text/javascript', response.content_type
- end
- end
-
- def test_destroy_membership
- assert_difference 'Group.find(10).members.count', -1 do
- post :destroy_membership, :id => 10, :membership_id => 6
- end
- end
-
- def test_xhr_destroy_membership
- assert_difference 'Group.find(10).members.count', -1 do
- xhr :post, :destroy_membership, :id => 10, :membership_id => 6
- assert_response :success
- assert_template 'destroy_membership'
- assert_equal 'text/javascript', response.content_type
- end
- end
-
def test_autocomplete_for_user
xhr :get, :autocomplete_for_user, :id => 10, :q => 'smi', :format => 'js'
assert_response :success