[Rt-commit] r3183 - in RT-Extension-AddAdminCcsOnQueueChange: . t
kevinr at bestpractical.com
kevinr at bestpractical.com
Wed Jun 15 17:54:05 EDT 2005
Author: kevinr
Date: Wed Jun 15 17:54:05 2005
New Revision: 3183
Modified:
RT-Extension-AddAdminCcsOnQueueChange/ (props changed)
RT-Extension-AddAdminCcsOnQueueChange/t/01-require.t
Log:
r4313 at sad-girl-in-snow: kevinr | 2005-06-15 16:59:48 -0400
* Now loads the action and the scrip
Modified: RT-Extension-AddAdminCcsOnQueueChange/t/01-require.t
==============================================================================
--- RT-Extension-AddAdminCcsOnQueueChange/t/01-require.t (original)
+++ RT-Extension-AddAdminCcsOnQueueChange/t/01-require.t Wed Jun 15 17:54:05 2005
@@ -13,6 +13,31 @@
my ($id, $message);
+# check if the action is installed and, if not, add it
+my $action = RT::ScripAction->new($RT::SystemUser);
+($id, $message) = $action->Load('AddQueueAdminCcs');
+if (!$id) {
+ ($id, $message) = $action->Create( Name => 'AddQueueAdminCcs',
+ Description => '',
+ ExecModule => 'AddQueueAdminCcs'
+ );
+}
+ok($id, "Loaded action? $message");
+
+# check if the scrip is installed and, if not, add it
+my $scrip = RT::Scrip->new($RT::SystemUser);
+($id, $message) = $scrip->Load('AddAdminCcsOnQueueChange');
+if (!$id) {
+ ($id, $message) = $scrip->Create( Description => 'AddAdminCcsOnQueueChange',
+ Queue => 0,
+ ScripCondition => 'On Queue Change',
+ ScripAction => 'AddQueueAdminCcs',
+ Template => 'Blank',
+ Stage => 'TransactionCreate'
+ );
+}
+ok($id, "Loaded scrip? $message");
+
# create queues
my $watched_queue = RT::Queue->new($RT::SystemUser);
($id, $message) = $watched_queue->Create( Name=>"Watched-$$" );
More information about the Rt-commit
mailing list