3 class ValidLinksTest < ActionDispatch::IntegrationTest
6 test "tail must exist on update" do
7 admin_auth = {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:admin).api_token}"}
9 post "/arvados/v1/links", {
14 head_uuid: users(:active).uuid,
15 tail_uuid: virtual_machines(:testvm).uuid
18 assert_response :success
19 u = json_response['uuid']
21 put "/arvados/v1/links/#{u}", {
24 tail_uuid: virtual_machines(:testvm2).uuid
27 assert_response :success
28 assert_equal virtual_machines(:testvm2).uuid, (ActiveSupport::JSON.decode @response.body)['tail_uuid']
30 put "/arvados/v1/links/#{u}", {
33 tail_uuid: 'zzzzz-tpzed-xyzxyzxerrrorxx'