Skip to content

Commit 062ef25

Browse files
cbrandtbuffalosunnavy
authored andcommitted
Test queue-level status rights shown on rights config
1 parent 5338745 commit 062ef25

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

t/web/lifecycle_rights.t

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,24 @@ diag 'Test status rights cleanup';
8383
$agent->text_lacks('StallTicket', 'Deleted right is gone on Rights page');
8484
}
8585

86+
diag 'Test that queue rights page only shows rights for its lifecycle';
87+
{
88+
# General queue uses 'default' lifecycle which has no custom status rights
89+
# The 'triage' lifecycle defines 'EscalateTicket' right
90+
# That right should NOT appear on General queue's rights page
91+
92+
$agent->get_ok('/Admin/Queues/GroupRights.html?id=1');
93+
$agent->text_lacks( 'EscalateTicket', 'Rights from other lifecycles should not appear on queue rights page' );
94+
95+
# Now test a queue using the 'triage' lifecycle DOES show EscalateTicket
96+
my $triage_queue = RT::Test->load_or_create_queue(
97+
Name => 'triage',
98+
Lifecycle => 'triage',
99+
);
100+
ok $triage_queue && $triage_queue->id, 'loaded or created triage queue';
101+
102+
$agent->get_ok('/Admin/Queues/GroupRights.html?id=' . $triage_queue->id);
103+
$agent->text_contains( 'EscalateTicket', 'Rights from queue lifecycle should appear on queue rights page' );
104+
}
105+
86106
done_testing;

0 commit comments

Comments
 (0)