fix: defaultThingId was not automatically set after creating first thing, also added a test for this.

This commit is contained in:
Yung Han Khoe 2008-03-15 15:47:55 +00:00
parent a4d9c81391
commit f70549720b
2 changed files with 25 additions and 13 deletions

View file

@ -17,7 +17,7 @@ use lib "$FindBin::Bin/../../lib";
use WebGUI::Test;
use WebGUI::Session;
use WebGUI::PseudoRequest;
use Test::More tests => 7; # increment this value for each test you create
use Test::More tests => 8; # increment this value for each test you create
use WebGUI::Asset::Wobject::Thingy;
my $session = WebGUI::Test->session;
@ -78,6 +78,10 @@ my ($thingTableNameCheck) = $session->db->quickArray("show tables like ".$sessio
is($thingTableNameCheck,$thingTableName,"An empty table: ".$thingTableName." for the new thing exists.");
is($thingy->get('defaultThingId'),$thingId,"The Thingy assets defaultThingId was set correctly.");
# Test adding a field
my %fieldProperties = (
thingId=>$thingId,
fieldId=>"new",