Added rfe #9098 Thingy thing-copy function and added some context to thingy's i18n

This commit is contained in:
Yung Han Khoe 2009-03-24 17:08:33 +00:00
parent d8fdd6d7df
commit a57fc80a18
6 changed files with 135 additions and 2 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 => 16; # increment this value for each test you create
use Test::More tests => 17; # increment this value for each test you create
use Test::Deep;
use JSON;
use WebGUI::Asset::Wobject::Thingy;
@ -192,6 +192,14 @@ my ($fieldLabel, $columnType, $Null, $Key, $Default, $Extra) = $session->db->qui
is($fieldLabel,"field_".$fieldId,"A column for the new field Field_$fieldId exists.");
is($columnType,"longtext","The columns is the right type");
# Test duplicating a Thing
my $copyThingId = $thingy->duplicateThing($thingId);
$isValidId = $session->id->valid($copyThingId);
is($isValidId,1,"duplicating a Thing: duplicateThing returned a valid id: ".$copyThingId);
# Test adding, editing, getting and deleting thing data
my ($newThingDataId,$errors) = $thingy->editThingDataSave($thingId,'new',{"field_".$fieldId => 'test value'});