1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class ValidLinksTest < ActionDispatch::IntegrationTest
10 test "tail must exist on update" do
11 admin_auth = {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:admin).api_token}"}
13 post "/arvados/v1/links",
19 head_uuid: users(:active).uuid,
20 tail_uuid: virtual_machines(:testvm).uuid
24 assert_response :success
25 u = json_response['uuid']
27 put "/arvados/v1/links/#{u}",
31 tail_uuid: virtual_machines(:testvm2).uuid
35 assert_response :success
36 assert_equal virtual_machines(:testvm2).uuid, (ActiveSupport::JSON.decode @response.body)['tail_uuid']
38 put "/arvados/v1/links/#{u}",
42 tail_uuid: 'zzzzz-tpzed-xyzxyzxerrrorxx'