[Bps-public-commit] r18731 - in RTx-WorkflowBuilder: lib/RTx t
clkao at bestpractical.com
clkao at bestpractical.com
Fri Mar 6 11:13:52 EST 2009
Author: clkao
Date: Fri Mar 6 11:13:52 2009
New Revision: 18731
Modified:
RTx-WorkflowBuilder/MANIFEST
RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm
RTx-WorkflowBuilder/t/multi-approver.t
Log:
make multi-approver actually work.
Modified: RTx-WorkflowBuilder/MANIFEST
==============================================================================
--- RTx-WorkflowBuilder/MANIFEST (original)
+++ RTx-WorkflowBuilder/MANIFEST Fri Mar 6 11:13:52 2009
@@ -15,3 +15,4 @@
META.yml
README
t/basic.t
+t/multi-approver.t
Modified: RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm
==============================================================================
--- RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm (original)
+++ RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm Fri Mar 6 11:13:52 2009
@@ -24,7 +24,8 @@
for (0..$#chain) {
push @result,
$self->get_stage_object($chain[$_],
- $_ ? $chain[$_-1] : undef,
+ $approving eq 'TOP' && $_ != 0
+ ? $chain[$_-1] : undef,
$_ == $#chain ? $approving : undef,
);
}
Modified: RTx-WorkflowBuilder/t/multi-approver.t
==============================================================================
--- RTx-WorkflowBuilder/t/multi-approver.t (original)
+++ RTx-WorkflowBuilder/t/multi-approver.t Fri Mar 6 11:13:52 2009
@@ -7,7 +7,7 @@
or plan skip_all => 'require Email::Abstract and Test::Email';
}
-plan tests => 33;
+plan tests => 34;
use RT;
use RT::Test;
use RT::Test::Email;
@@ -134,13 +134,17 @@
ok($ok, "roy can approve - $msg");
} { from => qr/RT System/, # why is this not roy?
+ to => 'ceo at company.com',
+ subject => qr/New Pending/,
+ body => qr/new item pending/
+},{ from => qr/RT System/, # why is this not roy?
to => 'minion at company.com',
subject => qr/Ticket Approved:/,
body => qr/approved by ROY/
};
$t->Load($t->id);$dependson_cfo->Load($dependson_cfo->id);
is_deeply([ map { $_->Status } $t, $dependson_roy, $dependson_cfo, $dependson_ceo ],
- [ 'open', 'resolved', 'deleted', 'new'], 'tickets in correct state');
+ [ 'open', 'resolved', 'deleted', 'open'], 'tickets in correct state');
# ceo approves
mail_ok {
More information about the Bps-public-commit
mailing list