1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class JobTest < ActiveSupport::TestCase
8 test "admin can edit description" do
10 assert(find_fixture(Job, "job_in_subproject")
11 .attribute_editable?("description"),
12 "admin not allowed to edit job description")
15 test "project owner can edit description" do
17 assert(find_fixture(Job, "job_in_subproject")
18 .attribute_editable?("description"),
19 "project owner not allowed to edit job description")
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")
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")