-
Notifications
You must be signed in to change notification settings - Fork 11
/
state.t
30 lines (21 loc) · 855 Bytes
/
state.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env perl
use strict;
use lib qw(../lib lib ../t t);
use TestUtil;
use Test::More tests => 21;
require_ok( 'Workflow::State' );
my $factory;
$factory = TestUtil->init_factory();
TestUtil->init_mock_persister();
# Run the tests with XML-based config.
TestUtil::run_state_tests($factory);
#### 11/18/2008 - Bob Stockdale ####
# Test the naming of the 'test' conditions -- all were formerly named
# 'evaluate'
my $wf = $factory->create_workflow('TestCondition');
my $state = $wf->_get_workflow_state('Ticket_Created');
my @conditions = $state->get_conditions('Ticket_Close');
is( $conditions[0]->name(), '_Ticket_Created_Ticket_Close_condition_1',
q{Got expected name for 'test' condition} );
is( $conditions[1]->name(), '_Ticket_Created_Ticket_Close_condition_2',
q{Got expected name for second 'test' condition} );