Some more refactoring
authorradhika chippada <radhika@radhika.curoverse>
Wed, 19 Mar 2014 13:59:24 +0000 (09:59 -0400)
committerradhika chippada <radhika@radhika.curoverse>
Wed, 19 Mar 2014 13:59:24 +0000 (09:59 -0400)
services/api/test/functional/arvados/v1/users_controller_test.rb

index 1d6d828b158a41739db2340a41d0350e13bbb20a..c6b0e3d2850d24208bdedc9320a0f2347f95b701 100644 (file)
@@ -251,12 +251,6 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
                # expect 4 new links: oid_login_perm, repo link, vm link and link add user to 'All users' group. 
                verify_num_links @all_links_at_start, 4
 
-               link_to_verify = {'link_class' => 'permission',
-                                       'name' => 'can_login',
-                               'tail_uuid' => created['email'],
-                               'head_kind' => 'arvados#user'}
-               verify_link_exists link_to_verify
-
                verify_link_exists_for_type 'Repository', 'permission', 'can_write', 'test_repo', created['uuid'], 'arvados#repository', true
 
                verify_link_exists_for_type 'Group', 'permission', 'can_read', 'All users', created['uuid'], 'arvados#group', true
@@ -271,14 +265,6 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
                                                        "Expected #{expected_num_additional_links.inspect} more links"
        end
 
-       def verify_link_exists (link)
-                       links = Link.where(link_class: link['link_class'],
-                                          name: link['name'],
-                                                  tail_uuid: link['tail_uuid'],
-                                                head_kind: link['head_kind'])
-                       assert links.size > 0, "expected one or more links with the given criteria"
-       end
-
        def verify_link_exists_for_type(class_name, link_class, link_name, head_uuid, tail_uuid, head_kind, fetch_object)
                if fetch_object
                        object = Object.const_get(class_name).where(name: head_uuid)