[ARVADOS] updated: 4daf12ad8cb2f74c3f3d72eafef7ed7a0621a4ac
Git user
git at public.curoverse.com
Tue Jun 6 13:53:30 EDT 2017
Summary of changes:
.../arvados/v1/groups_controller_test.rb | 37 ++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
via 4daf12ad8cb2f74c3f3d72eafef7ed7a0621a4ac (commit)
from fd4bdb760eb47013b8b60b40859ba7f004ee8383 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 4daf12ad8cb2f74c3f3d72eafef7ed7a0621a4ac
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Jun 6 13:53:25 2017 -0400
11652: Add tests for non-recursive and home-project cases.
diff --git a/services/api/test/functional/arvados/v1/groups_controller_test.rb b/services/api/test/functional/arvados/v1/groups_controller_test.rb
index e82113e..3beec35 100644
--- a/services/api/test/functional/arvados/v1/groups_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb
@@ -478,16 +478,49 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
:<, json_response['items_available'])
end
- test 'get contents recursive=true' do
+ test 'get contents, recursive=true' do
+ authorize_with :active
+ params = {
+ id: groups(:aproject).uuid,
+ recursive: true,
+ format: :json,
+ }
+ get :contents, params
+ owners = json_response['items'].map do |item|
+ item['owner_uuid']
+ end
+ assert_includes(owners, groups(:aproject).uuid)
+ assert_includes(owners, groups(:asubproject).uuid)
+ end
+
+ [false, nil].each do |recursive|
+ test "get contents, recursive=#{recursive.inspect}" do
+ authorize_with :active
+ params = {
+ id: groups(:aproject).uuid,
+ format: :json,
+ }
+ params[:recursive] = false if recursive == false
+ get :contents, params
+ owners = json_response['items'].map do |item|
+ item['owner_uuid']
+ end
+ assert_includes(owners, groups(:aproject).uuid)
+ refute_includes(owners, groups(:asubproject).uuid)
+ end
+ end
+
+ test 'get home project contents, recursive=true' do
authorize_with :active
get :contents, {
- id: groups(:aproject).uuid,
+ id: users(:active).uuid,
recursive: true,
format: :json,
}
owners = json_response['items'].map do |item|
item['owner_uuid']
end
+ assert_includes(owners, users(:active).uuid)
assert_includes(owners, groups(:aproject).uuid)
assert_includes(owners, groups(:asubproject).uuid)
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list