Large batch of test fixes, most for newByDynamicClass -> newById

This commit is contained in:
Colin Kuskie 2010-05-13 20:02:26 -07:00
parent c74894321d
commit 5140ece731
17 changed files with 41 additions and 39 deletions

View file

@ -51,7 +51,7 @@ my $collab
$versionTag->commit( { timeout => 1_000_000 } );
# Re-load the collab to get the newly committed properties
$collab = WebGUI::Asset->newByDynamicClass( $session, $collab->getId );
$collab = WebGUI::Asset->newById( $session, $collab->getId );
#----------------------------------------------------------------------------
# Tests

View file

@ -50,7 +50,7 @@ plan tests => 1; # Increment this number for each test you create
#----------------------------------------------------------------------------
# www_unarchiveAll sets all threads to approved
$collab->www_unarchiveAll;
$threads[0] = WebGUI::Asset->newByDynamicClass( $session, $threads[0]->getId );
$threads[0] = WebGUI::Asset->newById( $session, $threads[0]->getId );
is( $threads[0]->get('status'), 'approved', "unarchiveAll sets thread to approved" );
#vim:ft=perl

View file

@ -62,7 +62,7 @@ my $properties = $gallery->get;
$gallery->purge;
is(
WebGUI::Asset->newByDynamicClass($session, $properties->{assetId}), undef,
WebGUI::Asset->newById($session, $properties->{assetId}), undef,
"Gallery no longer able to be instanciated",
);

View file

@ -67,7 +67,7 @@ my $properties = $album->get;
$album->purge;
is(
WebGUI::Asset->newByDynamicClass($session, $properties->{assetId}), undef,
WebGUI::Asset->newById($session, $properties->{assetId}), undef,
"Album no longer able to be instanciated",
);

View file

@ -96,7 +96,7 @@ $maker->prepare({
$maker->run;
is(
WebGUI::Asset->newByDynamicClass( $session, $assetId ),
WebGUI::Asset->newById( $session, $assetId ),
undef,
"GalleryAlbum cannot be instanciated after www_deleteConfirm",
);

View file

@ -109,7 +109,7 @@ $mech->content_contains(
);
# Creates the album with the appropriate properties
my $album = WebGUI::Asset->newByDynamicClass( $session, $gallery->getAlbumIds->[0] );
my $album = WebGUI::Asset->newById( $session, $gallery->getAlbumIds->[0] );
cmp_deeply( $properties, subhashof( $album->get ), "Properties from edit form are set correctly" );
#----------------------------------------------------------------------------