fix a bug with the new assetDbProperties method. It used the wrong class
This commit is contained in:
parent
8bd9f14a3f
commit
c615268d94
2 changed files with 5 additions and 2 deletions
|
|
@ -113,7 +113,7 @@ sub assetDbProperties {
|
|||
my $sql = "select * from asset";
|
||||
my $where = " where asset.assetId=?";
|
||||
my $placeHolders = [$assetId];
|
||||
foreach my $definition (@{$class->definition($session)}) {
|
||||
foreach my $definition (@{$className->definition($session)}) {
|
||||
$sql .= ",".$definition->{tableName};
|
||||
$where .= " and (asset.assetId=".$definition->{tableName}.".assetId and ".$definition->{tableName}.".revisionDate=".$revisionDate.")";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use lib "$FindBin::Bin/../../lib";
|
|||
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
use Test::More tests => 20; # increment this value for each test you create
|
||||
use Test::More tests => 23; # increment this value for each test you create
|
||||
use WebGUI::Asset::Wobject::Article;
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
|
@ -108,7 +108,10 @@ is ($duplicateFilename, undef, 'purge method deletes collateral');
|
|||
# Lets make sure the view method returns something.
|
||||
# This is not a very good test but I need to do it to test the purgeCache method anyways =)
|
||||
|
||||
is ($article->{_viewTemplate}, undef, 'internal template cache unset until prepareView is called');
|
||||
$article->prepareView;
|
||||
isnt ($article->{_viewTemplate}, undef, 'internal template cache set by prepare view');
|
||||
isa_ok ($article->{_viewTemplate}, 'WebGUI::Asset::Template', 'internal template cache');
|
||||
my $output = $article->view;
|
||||
isnt ($output, "", 'view method returns something');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue