Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make multi-approver actually work.

  • Loading branch information...
commit 98c89c80cadafefb4baede5a8078252290223038 1 parent a210aca
Chia-liang Kao authored
Showing with 9 additions and 3 deletions.
  1. +1 −0  MANIFEST
  2. +2 −1  lib/RTx/WorkflowBuilder.pm
  3. +6 −2 t/multi-approver.t
View
1  MANIFEST
@@ -15,3 +15,4 @@ MANIFEST This list of files
META.yml
README
t/basic.t
+t/multi-approver.t
View
3  lib/RTx/WorkflowBuilder.pm
@@ -24,7 +24,8 @@ sub get_stage_object {
for (0..$#chain) {
push @result,
$self->get_stage_object($chain[$_],
- $_ ? $chain[$_-1] : undef,
+ $approving eq 'TOP' && $_ != 0
+ ? $chain[$_-1] : undef,
$_ == $#chain ? $approving : undef,
);
}
View
8 t/multi-approver.t
@@ -7,7 +7,7 @@ BEGIN {
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 @@ mail_ok {
ok($ok, "roy can approve - $msg");
} { from => qr/RT System/, # why is this not roy?
+ to => 'ceo@company.com',
+ subject => qr/New Pending/,
+ body => qr/new item pending/
+},{ from => qr/RT System/, # why is this not roy?
to => 'minion@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 {

0 comments on commit 98c89c8

Please sign in to comment.
Something went wrong with that request. Please try again.