[Rt-commit] [rtir] 01/22: Remove old constituency ACL test
Jesse Vincent
jesse at bestpractical.com
Sun Mar 29 02:50:56 EDT 2015
This is an automated email from the git hooks/post-receive script.
jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.
commit 5377b741614b4545e92396c9213c94ec67260dbb
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sat Mar 28 14:37:41 2015 -0700
Remove old constituency ACL test
This old ACL test only tested behavior we have removed:
If you give someone rights on a constituency-specific queue, do they end up
with those rights on the main rtir queue
---
t/constituency/acl.t | 48 ------------------------------------------------
1 file changed, 48 deletions(-)
diff --git a/t/constituency/acl.t b/t/constituency/acl.t
deleted file mode 100644
index 4a22cf0..0000000
--- a/t/constituency/acl.t
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More skip_all => 'constituencies being rebuilt';
-use RT::IR::Test tests => undef;
-use_ok('RT::IR');
-
-my $cf;
-diag "load and check basic properties of the CF" if $ENV{'TEST_VERBOSE'};
-{
- my $cfs = RT::CustomFields->new( $RT::SystemUser );
- $cfs->Limit( FIELD => 'Name', VALUE => 'Constituency', CASESENSITIVE => 0 );
- $cf = $cfs->First;
- ok $cf && $cf->id, 'loaded field';
- is $cf->Name, 'Constituency', 'good name';
-}
-
-my $user = RT::Test->load_or_create_user(
- Name => 'test',
- Password => 'password',
-);
-ok $user && $user->id, 'loaded or created user';
-
-my $queue_ir = RT::Test->load_or_create_queue( Name => 'Incident Reports' );
-ok $queue_ir && $queue_ir->id, 'loaded or created queue';
-
-# cleanup ACLs
-RT::Test->set_rights;
-
-my $queue_ir_edunet = RT::Test->load_or_create_queue( Name => 'Incident Reports - EDUNET' );
-ok $queue_ir_edunet && $queue_ir_edunet->id, 'loaded or created queue';
-
-{
- my $queue = RT::Queue->new( $user );
- $queue->Load('Incident Reports');
- ok $queue->id, 'loaded IR queue object';
- ok !$queue->CurrentUserHasRight('CreateTicket'), 'user has no right';
-
- RT::Test->set_rights(
- Principal => $user->PrincipalObj,
- Right => ['CreateTicket', 'SeeQueue'],
- Object => $queue_ir_edunet,
- );
- ok $queue->CurrentUserHasRight('CreateTicket'), 'user has right';
- ok $queue->CurrentUserHasRight('SeeQueue'), 'user has right';
-}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list