3 class JobTest < ActiveSupport::TestCase
4 test "admin can edit description" do
6 assert(find_fixture(Job, "job_in_subproject")
7 .attribute_editable?("description"),
8 "admin not allowed to edit job description")
11 test "project owner can edit description" do
13 assert(find_fixture(Job, "job_in_subproject")
14 .attribute_editable?("description"),
15 "project owner not allowed to edit job description")
18 test "project admin can edit description" do
19 use_token :subproject_admin
20 assert(find_fixture(Job, "job_in_subproject")
21 .attribute_editable?("description"),
22 "project admin not allowed to edit job description")
25 test "project viewer cannot edit description" do
26 use_token :project_viewer
27 refute(find_fixture(Job, "job_in_subproject")
28 .attribute_editable?("description"),
29 "project viewer allowed to edit job description")