14287: Fix PDHs and manifests in test fixtures.
[arvados.git] / apps / workbench / test / unit / job_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 JobTest < ActiveSupport::TestCase
8   test "admin can edit description" do
9     use_token :admin
10     assert(find_fixture(Job, "job_in_subproject")
11              .attribute_editable?("description"),
12            "admin not allowed to edit job description")
13   end
14
15   test "project owner can edit description" do
16     use_token :active
17     assert(find_fixture(Job, "job_in_subproject")
18              .attribute_editable?("description"),
19            "project owner not allowed to edit job description")
20   end
21
22   test "project admin can edit description" do
23     use_token :subproject_admin
24     assert(find_fixture(Job, "job_in_subproject")
25              .attribute_editable?("description"),
26            "project admin not allowed to edit job description")
27   end
28
29   test "project viewer cannot edit description" do
30     use_token :project_viewer
31     refute(find_fixture(Job, "job_in_subproject")
32              .attribute_editable?("description"),
33            "project viewer allowed to edit job description")
34   end
35 end