Adding missing file.
[arvados.git] / services / api / test / unit / permission_test.rb
1 require 'test_helper'
2
3 class PermissionTest < ActiveSupport::TestCase
4   test "Grant permissions on an object I own" do
5     set_user_from_auth :active_trustedclient
6
7     ob = Specimen.create
8     assert ob.save
9
10     # Ensure I have permission to manage this group even when its owner changes
11     perm_link = Link.create(tail_uuid: users(:active).uuid,
12                             head_uuid: ob.uuid,
13                             link_class: 'permission',
14                             name: 'can_manage')
15     assert perm_link.save, "should give myself permission on my own object"
16   end
17 end