diff --git a/t/Asset.t b/t/Asset.t index 7bb06cf80..6d4b5d004 100644 --- a/t/Asset.t +++ b/t/Asset.t @@ -159,11 +159,6 @@ my $session = WebGUI::Test->session; is $asset->title, 'Root', 'got the right asset'; } -{ - note "uiLevel"; - is +WebGUI::Asset->meta->uiLevel, 1, 'uiLevel: default for assets is 1'; -} - { note "write, update"; @@ -301,3 +296,9 @@ my $session = WebGUI::Test->session; is ($asset->keywords, 'chess set', 'set and get of keywords via direct accessor'); is ($asset->get('keywords'), 'chess set', 'via get method'); } + +{ + note "valid_parent_classes"; + my $classes = WebGUI::Asset->valid_parent_classes; + cmp_deeply($classes, [qw/WebGUI::Asset/], 'Any asset okay'); +} diff --git a/t/tests/Test/WebGUI/Asset.pm b/t/tests/Test/WebGUI/Asset.pm index f365392e5..9fcfcc481 100644 --- a/t/tests/Test/WebGUI/Asset.pm +++ b/t/tests/Test/WebGUI/Asset.pm @@ -189,6 +189,8 @@ sub get_tables : Test(1) { my $test = shift; note "get_tables"; my @tables = $test->class->meta->get_tables; + use Data::Dumper; + diag Dumper \@tables; cmp_bag( \@tables, $test->list_of_tables, @@ -264,6 +266,18 @@ sub newByPropertyHashRef : Test(2) { is $asset->title, 'The Shawshank Snippet', 'title is assigned from the property hash'; } +sub scan_properties : Test(1) { + note "scan properties for table definitions"; + my $test = shift; + my @properties = $test->class->meta->get_all_properties; + my @undefined_tables = (); + foreach my $prop (@properties) { + push @undefined_tables, $prop->name if (!$prop->tableName); + } + ok !@undefined_tables, "all properties have tables defined" + or diag "except these: ".join ", ", @undefined_tables; +} + 1;