Merge branch '2879-job-api-docker-images'
[arvados.git] / services / api / test / unit / group_test.rb
index 6b419ad64a621870aca2b04d1a232a485aa35327..97977a5d56be7ba87bd8c2c93938b41ec36902b2 100644 (file)
@@ -5,9 +5,10 @@ class GroupTest < ActiveSupport::TestCase
   test "cannot set owner_uuid to object with existing ownership cycle" do
     set_user_from_auth :active_trustedclient
 
-    # First make sure we have lots of permission on the bad group
+    # First make sure we have lots of permission on the bad group by
+    # renaming it to "{current name} is mine all mine"
     g = groups(:bad_group_has_ownership_cycle_b)
-    g.name += " xyz"
+    g.name += " is mine all mine"
     assert g.save, "active user should be able to modify group #{g.uuid}"
 
     # Use the group as the owner of a new object
@@ -17,7 +18,7 @@ class GroupTest < ActiveSupport::TestCase
     assert_equal false, s.save, "should not save object with #{g.uuid} as owner"
 
     # Use the group as the new owner of an existing object
-    s = specimens(:in_afolder)
+    s = specimens(:in_aproject)
     s.owner_uuid = groups(:bad_group_has_ownership_cycle_b).uuid
     assert s.valid?, "ownership should pass validation"
     assert_equal false, s.save, "should not save object with #{g.uuid} as owner"