some bug fixing
added some tests
This commit is contained in:
parent
b70ef9d23a
commit
1ce61982ed
7 changed files with 66 additions and 68 deletions
30
t/Content/Maintenance.t
Normal file
30
t/Content/Maintenance.t
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use FindBin;
|
||||
use strict;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Content::Maintenance;
|
||||
|
||||
# load your modules here
|
||||
|
||||
use Test::More tests => 2; # increment this value for each test you create
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
# put your tests here
|
||||
|
||||
$session->setting->set("specialState", "upgrading");
|
||||
isnt(WebGUI::Content::Maintenance::handler($session), undef, "Maintenance should return some output when in upgrade special state");
|
||||
$session->setting->remove("specialState");
|
||||
is(WebGUI::Content::Maintenance::handler($session), undef, "Maintenance shouldn't return anything when no special state is present");
|
||||
|
||||
30
t/Content/Setup.t
Normal file
30
t/Content/Setup.t
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use FindBin;
|
||||
use strict;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Content::Setup;
|
||||
|
||||
# load your modules here
|
||||
|
||||
use Test::More tests => 2; # increment this value for each test you create
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
# put your tests here
|
||||
|
||||
$session->setting->set("specialState", "init");
|
||||
isnt(WebGUI::Content::Setup::handler($session), undef, "Setup should return some output when in init special state");
|
||||
$session->setting->remove("specialState");
|
||||
is(WebGUI::Content::Setup::handler($session), undef, "Setup shouldn't return anything when no special state is present");
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue