projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
19146: Add can_write/can_manage to users#list, fix select=can_*.
[arvados.git]
/
services
/
api
/
test
/
functional
/
arvados
/
v1
/
users_controller_test.rb
diff --git
a/services/api/test/functional/arvados/v1/users_controller_test.rb
b/services/api/test/functional/arvados/v1/users_controller_test.rb
index ae7b21dec83e556f8321ee7290e5680824be5881..6a7b00a00573f9413a61856d66fd6e6eb3900c65 100644
(file)
--- a/
services/api/test/functional/arvados/v1/users_controller_test.rb
+++ b/
services/api/test/functional/arvados/v1/users_controller_test.rb
@@
-674,6
+674,12
@@
The Arvados team.
get(:index)
check_non_admin_index
check_readable_users_index [:spectator], [:inactive, :active]
get(:index)
check_non_admin_index
check_readable_users_index [:spectator], [:inactive, :active]
+ json_response["items"].each do |u|
+ if u["uuid"] == users(:spectator).uuid
+ assert_equal true, u["can_write"]
+ assert_equal true, u["can_manage"]
+ end
+ end
end
test "non-admin user gets only safe attributes from users#show" do
end
test "non-admin user gets only safe attributes from users#show" do
@@
-1079,7
+1085,7
@@
The Arvados team.
end
NON_ADMIN_USER_DATA = ["uuid", "kind", "is_active", "email", "first_name",
end
NON_ADMIN_USER_DATA = ["uuid", "kind", "is_active", "email", "first_name",
- "last_name", "username"].sort
+ "last_name", "username"
, "can_write", "can_manage"
].sort
def check_non_admin_index
assert_response :success
def check_non_admin_index
assert_response :success