From 9ddd91570ecc4dcb32246d329727815860b36281 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 3 Aug 2006 19:38:41 +0000 Subject: [PATCH] - Added some more tests to the suite. - Fixed the test skeleton --- docs/changelog/7.x.x.txt | 2 ++ t/AdSpace.t | 30 ++++++++++++++++++++++++++++++ t/_test.skeleton | 6 +++++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 t/AdSpace.t diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 8bfff5419..0c850aa7c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,8 @@ 7.0.5 - Added a --skipDelete option to upgrade.pl - rfe: Approvers don't need to approve own changes + - Added some more tests to the suite. + - Fixed the test skeleton 7.0.4 diff --git a/t/AdSpace.t b/t/AdSpace.t new file mode 100644 index 000000000..37cfa72f2 --- /dev/null +++ b/t/AdSpace.t @@ -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::AdSpace; +use Test::More tests => 3; # increment this value for each test you create + +my $session = WebGUI::Test->session; + +my $adSpace = WebGUI::AdSpace->create($session, {name=>"Alfred"}); + +my $data = $session->db->quickHashRef("select adSpaceId, name from adSpace where adSpaceId=?",[$adSpace->getId]); + +ok(exists $data->{adSpaceId}, "create()"); +is($data->{name}, $adSpace->get("name"), "get()"); +is($data->{adSpaceId}, $adSpace->getId, "getId()"); + + + diff --git a/t/_test.skeleton b/t/_test.skeleton index 654a5b027..55ab13a23 100644 --- a/t/_test.skeleton +++ b/t/_test.skeleton @@ -11,10 +11,14 @@ use FindBin; use strict; use lib "$FindBin::Bin/lib"; - +use WebGUI::Test; use WebGUI::Session; + +# load your modules here + use Test::More tests => 1; # increment this value for each test you create my $session = WebGUI::Test->session; # put your tests here +