X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ad79a64bd1503e1e47d3849a00b894c4a6bc9810..aea4b0cd7553dfb27c3e6c448fcad349284d6cf4:/services/api/test/functional/arvados/v1/links_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/links_controller_test.rb b/services/api/test/functional/arvados/v1/links_controller_test.rb index 804e1bdfdb..d5b42665c3 100644 --- a/services/api/test/functional/arvados/v1/links_controller_test.rb +++ b/services/api/test/functional/arvados/v1/links_controller_test.rb @@ -270,4 +270,17 @@ class Arvados::V1::LinksControllerTest < ActionController::TestCase assert_response :success end + test "refuse duplicate name" do + the_name = links(:job_name_in_aproject).name + the_project = links(:job_name_in_aproject).tail_uuid + authorize_with :active + post :create, link: { + tail_uuid: the_project, + head_uuid: specimens(:owned_by_active_user).uuid, + link_class: 'name', + name: the_name, + properties: {this_s: "a duplicate name"} + } + assert_response 422 + end end