From d65f9f1e5116476e60f71e2874c347975b36a374 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 31 Dec 2007 04:59:52 +0000 Subject: [PATCH] add tests for getContainer --- t/Asset/Asset.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/Asset/Asset.t b/t/Asset/Asset.t index 77eb9b99d..e1187bbd8 100644 --- a/t/Asset/Asset.t +++ b/t/Asset/Asset.t @@ -134,7 +134,7 @@ $canViewMaker->prepare( }, ); -plan tests => 59 +plan tests => 61 + scalar(@fixIdTests) + scalar(@fixTitleTests) + $canAddMaker->plan @@ -478,6 +478,15 @@ ok($addMissing, 'addMissing returns some output when in Admin Mode'); } +################################################################ +# +# getContainer +# +################################################################ + +is($rootAsset->getContainer->getId, $rootAsset->getId, 'getContainer: A folder is a container, its container is itself'); +is($fixTitleAsset->getContainer->getId, $defaultAsset->getId, 'getContainer: A snippet is not a container, its container is its parent'); + END: { $session->config->set('extrasURL', $origExtras); $session->config->set('uploadsURL', $origUploads);