rfe #12127: AssetProperty macro

This commit is contained in:
Paul Driver 2011-05-11 09:30:36 -05:00
parent 34eda690ee
commit 6a01296019
5 changed files with 82 additions and 0 deletions

25
t/Macro/AssetProperty.t Normal file
View file

@ -0,0 +1,25 @@
use warnings;
use strict;
use Test::More tests => 8;
use FindBin;
use lib "$FindBin::Bin/../lib";
use WebGUI::Test;
use WebGUI::Asset;
use WebGUI::Macro::AssetProperty;
my $session = WebGUI::Test->session;
my $temp = WebGUI::Asset->getTempspace($session);
my $props = $temp->get;
my ($url, $id) = @{$props}{qw(url assetId)};
sub proc { WebGUI::Macro::AssetProperty::process($session, @_) }
is proc($id, 'url'), $url, 'assetId';
is proc($url, 'assetId'), $id, 'url';
for my $name (qw(url assetId parentId lineage title menuTitle)) {
is proc($id, $name), $props->{$name}, "get $name";
}