X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0f5b0542513b572959e39400bae42e69aeb1a7b6..HEAD:/services/api/test/unit/link_test.rb diff --git a/services/api/test/unit/link_test.rb b/services/api/test/unit/link_test.rb index 5d36653a56..fb0d028337 100644 --- a/services/api/test/unit/link_test.rb +++ b/services/api/test/unit/link_test.rb @@ -13,7 +13,7 @@ class LinkTest < ActiveSupport::TestCase test "cannot delete an object referenced by unwritable links" do ob = act_as_user users(:active) do - Specimen.create + Collection.create end link = act_as_user users(:admin) do Link.create(tail_uuid: users(:active).uuid, @@ -109,7 +109,7 @@ class LinkTest < ActiveSupport::TestCase test "updating permission causes any conflicting links to be deleted" do link1, link2 = create_overlapping_permissions(['can_read', 'can_manage']) - Link.find_by_uuid(link2).update_attributes!(name: 'can_write') + Link.find_by_uuid(link2).update!(name: 'can_write') assert_empty Link.where(uuid: link1) end @@ -121,8 +121,8 @@ class LinkTest < ActiveSupport::TestCase test "updating login permission causes any conflicting links to be deleted" do link1, link2 = create_overlapping_permissions(['can_login', 'can_login'], {properties: {username: 'foo1'}}) - Link.find_by_uuid(link1).update_attributes!(properties: {'username' => 'foo2'}) - Link.find_by_uuid(link2).update_attributes!(properties: {'username' => 'foo2'}) + Link.find_by_uuid(link1).update!(properties: {'username' => 'foo2'}) + Link.find_by_uuid(link2).update!(properties: {'username' => 'foo2'}) assert_empty Link.where(uuid: link1) end