Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / test / unit / repository_test.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require 'test_helper'
6
7 class RepositoryTest < ActiveSupport::TestCase
8   [
9     ['admin', true],
10     ['active', false],
11   ].each do |user, can_edit|
12     test "#{user} can edit attributes #{can_edit}" do
13       use_token user
14       attrs = Repository.new.editable_attributes
15       if can_edit
16         refute_empty attrs
17       else
18         assert_empty attrs
19       end
20     end
21   end
22 end