summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-01-11 11:47:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-01-11 11:47:26 +0000
commit9ad2ca61da9d91ac0d7de999ce492bbeb3a0449c (patch)
tree4deee0e5202c32ff3e1cfdc4df2d31ae8e62badb /test
parentde19424ea5b5c273817732a28a7f7ca6073e4107 (diff)
downloadredmine-9ad2ca61da9d91ac0d7de999ce492bbeb3a0449c.tar.gz
redmine-9ad2ca61da9d91ac0d7de999ce492bbeb3a0449c.zip
Fixed: cannot retrieve members for closed projects through the REST API (#15848).
git-svn-id: http://svn.redmine.org/redmine/trunk@12650 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/integration/api_test/memberships_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/integration/api_test/memberships_test.rb b/test/integration/api_test/memberships_test.rb
index 626282054..0a319420f 100644
--- a/test/integration/api_test/memberships_test.rb
+++ b/test/integration/api_test/memberships_test.rb
@@ -73,6 +73,14 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
json)
end
+ test "GET /projects/:project_id/memberships.xml should succeed for closed project" do
+ project = Project.find(1)
+ project.close
+ assert !project.reload.active?
+ get '/projects/1/memberships.json', {}, credentials('jsmith')
+ assert_response :success
+ end
+
test "POST /projects/:project_id/memberships.xml should create the membership" do
assert_difference 'Member.count' do
post '/projects/1/memberships.xml', {:membership => {:user_id => 7, :role_ids => [2,3]}}, credentials('jsmith')