add some tests for set and stickiness
This commit is contained in:
parent
d8fde8a5ed
commit
8bfce39f21
1 changed files with 31 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ my $session = WebGUI::Test->session;
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
plan tests => 17; # Increment this number for each test you create
|
||||
plan tests => 26; # Increment this number for each test you create
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# put your tests here
|
||||
|
|
@ -120,6 +120,36 @@ is($otherInstance->{_started}, 1, 'By default, _started = 0');
|
|||
$otherInstance = WebGUI::Workflow::Instance->new($session, $instance->getId, 1);
|
||||
is($otherInstance->{_started}, 0, 'By default, _started = 1');
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# set
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
$instance->set({
|
||||
priority => 3,
|
||||
lastStatus => 'undefined',
|
||||
workflowId => 'notAWorkflowId',
|
||||
className => 'WebGUI::Session',
|
||||
methodName => 'open',
|
||||
currentActivityId => 'notAnActivityId',
|
||||
} , 1);
|
||||
is($instance->get('priority'), 3, 'set priority');
|
||||
is($instance->get('lastStatus'), 'undefined', 'set lastStatus');
|
||||
is($instance->get('workflowId'), 'notAWorkflowId', 'set workflowId');
|
||||
is($instance->get('className'), 'WebGUI::Session', 'set workflowId');
|
||||
is($instance->get('methodName'), 'open', 'set workflowId');
|
||||
is($instance->get('currentActivityId'), 'notAnActivityId', 'set workflowId');
|
||||
|
||||
$instance->set({
|
||||
priority => 0,
|
||||
lastStatus => '',
|
||||
workflowId => '',
|
||||
} , 1);
|
||||
is($instance->get('priority'), 3, 'set priority, is sticky');
|
||||
is($instance->get('lastStatus'), 'undefined', 'set lastStatus is sticky');
|
||||
is($instance->get('workflowId'), 'notAWorkflowId', 'set workflowId is sticky');
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Cleanup
|
||||
END {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue