X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3dfc071494cbb0386ecd7269c72a435fc7f9cc24..40b15b9523c1a89769c8df5bafa250075af0c567:/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 9c4d18b241..2d26370b74 100644 --- a/services/api/test/functional/arvados/v1/users_controller_test.rb +++ b/services/api/test/functional/arvados/v1/users_controller_test.rb @@ -779,6 +779,16 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase assert_equal false, found_email, 'Expected no email after updating profile' end + test "user API response includes writable_by" do + authorize_with :active + get :current + assert_response :success + assert_includes(json_response["writable_by"], users(:active).uuid, + "user's writable_by should include self") + assert_includes(json_response["writable_by"], users(:active).owner_uuid, + "user's writable_by should include its owner_uuid") + end + NON_ADMIN_USER_DATA = ["uuid", "kind", "is_active", "email", "first_name", "last_name"].sort