A few more tests to kick coverage up to 100 on WebGUI::Session::Setting

Convert it to use placeholders as well.
More WebGUI::Session::Url tests, and some bug fixes:
	getRefererUrl returned parameters and accepted weird methods that
	looked like http but weren't.
This commit is contained in:
Colin Kuskie 2006-09-25 03:49:25 +00:00
parent 00e37ae971
commit eea7b941c9
4 changed files with 60 additions and 9 deletions

View file

@ -15,7 +15,7 @@ use lib "$FindBin::Bin/../lib";
use WebGUI::Test;
use WebGUI::Session;
use Test::More tests => 4; # increment this value for each test you create
use Test::More tests => 6; # increment this value for each test you create
my $session = WebGUI::Test->session;
@ -26,6 +26,9 @@ is($session->setting->get("test"), "XXX", "get()");
$session->setting->set("test","YYY");
my ($value) = $session->db->quickArray("select value from settings where name='test'");
is($value, 'YYY', "set()");
is($session->setting->get("test"), 'YYY', 'set() also updates object cache');
$session->setting->remove("test");
my ($value) = $session->db->quickArray("select value from settings where name='test'");
is($value, undef, "delete()");
isa_ok($session->setting->session, 'WebGUI::Session', 'session method returns a session object');