Merge branch 'master' into 6093-refresh-docs
[arvados.git] / apps / workbench / test / unit / repository_test.rb
1 require 'test_helper'
2
3 class RepositoryTest < ActiveSupport::TestCase
4   [
5     ['admin', true],
6     ['active', false],
7   ].each do |user, can_edit|
8     test "#{user} can edit attributes #{can_edit}" do
9       use_token user
10       attrs = Repository.new.editable_attributes
11       if can_edit
12         refute_empty attrs
13       else
14         assert_empty attrs
15       end
16     end
17   end
18 end