initial base of Account test classes
This commit is contained in:
parent
6bb5ab997d
commit
8bd2deabe3
3 changed files with 98 additions and 0 deletions
26
t/run_account.t
Normal file
26
t/run_account.t
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 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
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
BEGIN {
|
||||
|
||||
use File::Spec::Functions qw( catdir rel2abs );
|
||||
use File::Basename;
|
||||
use Test::More;
|
||||
use Test::Class;
|
||||
use Module::Find;
|
||||
use lib rel2abs( catdir ( dirname( __FILE__ ), 'tests' ) );
|
||||
|
||||
# plan skip_all => "Extremely slow asset tests only run if WEBGUI_ASSET_TESTS set"
|
||||
# unless $ENV{WEBGUI_ASSET_TESTS};
|
||||
useall('Test::WebGUI::Account');
|
||||
}
|
||||
|
||||
Test::Class->runtests;
|
||||
|
||||
54
t/tests/Test/WebGUI/Account.pm
Normal file
54
t/tests/Test/WebGUI/Account.pm
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
package Test::WebGUI::Account;
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 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 strict;
|
||||
use warnings;
|
||||
|
||||
use base qw/My::Test::Class/;
|
||||
|
||||
use Test::More;
|
||||
use Test::Deep;
|
||||
use Test::Exception;
|
||||
use WebGUI::Test;
|
||||
use Data::Dumper;
|
||||
use List::MoreUtils;
|
||||
|
||||
sub _constructor : Test(2) {
|
||||
my $test = shift;
|
||||
my $session = $test->session;
|
||||
|
||||
my $obj = $test->class->new($session);
|
||||
|
||||
note "new for ". $test->class;
|
||||
isa_ok $obj, $test->class;
|
||||
isa_ok $obj->session, 'WebGUI::Session';
|
||||
}
|
||||
|
||||
sub t_00_method_check : Test(1) {
|
||||
my $test = shift;
|
||||
my $session = $test->session;
|
||||
my $obj = $test->class->new($session);
|
||||
|
||||
can_ok $obj, qw/session module uid bare store appendCommonVars callMethod displayContent canView
|
||||
editSettingsForm editSettingsFormSave getLayoutTemplateId getStyleTemplateId getUrl
|
||||
getUser processTemplate showError /;
|
||||
}
|
||||
|
||||
sub t_01_editSettingsForm : Tests {
|
||||
my $test = shift;
|
||||
my $session = $test->session;
|
||||
my $obj = $test->class->new( $session );
|
||||
|
||||
my $fb = $obj->editSettingsForm;
|
||||
isa_ok $fb, 'WebGUI::FormBuilder';
|
||||
}
|
||||
|
||||
1;
|
||||
18
t/tests/Test/WebGUI/Account/Inbox.pm
Normal file
18
t/tests/Test/WebGUI/Account/Inbox.pm
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package Test::WebGUI::Account::Inbox;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 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 strict;
|
||||
use warnings;
|
||||
|
||||
use base qw/Test::WebGUI::Account/;
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue