From d6a62df50c924121de09582d5bda7b7e13691408 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 15 Oct 2006 01:16:57 +0000 Subject: [PATCH] This test is failing in the smoke-tests, but manual runs by two different people on different OS'es are passing. I've added some diagnostic tests to help us figure out what's going on. --- t/Asset/Wobject/Article.t | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/t/Asset/Wobject/Article.t b/t/Asset/Wobject/Article.t index 6ec5de769..addc6e567 100644 --- a/t/Asset/Wobject/Article.t +++ b/t/Asset/Wobject/Article.t @@ -16,7 +16,7 @@ use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; -use Test::More tests => 17; # increment this value for each test you create +use Test::More tests => 19; # increment this value for each test you create use WebGUI::Asset::Wobject::Article; my $session = WebGUI::Test->session; @@ -68,8 +68,14 @@ my $filename = "page_title.jpg"; # Use some test collateral to create a storage location and assign it to our article my $storage = WebGUI::Storage::Image->create($session); -$storage->addFileFromFilesystem("../../supporting_collateral/".$filename); +my $storedFilename = $storage->addFileFromFilesystem("../../supporting_collateral/".$filename); +my $filenameOK = is ($storedFilename, $filename, 'storage created correctly'); $article->update({storageId=>$storage->getId}); +my $storageOK = is($article->get('storageId'), $storage->getId, 'correct storage id stored'); + +SKIP: { + +skip 'storage test setup problem', 3 unless $filenameOK and $storageOK; my $duplicateArticle = $article->duplicate(); isa_ok($duplicateArticle, 'WebGUI::Asset::Wobject::Article'); @@ -92,6 +98,8 @@ $duplicateFilename = $duplicateStorage->getFiles->[0]; is ($duplicateFilename, undef, 'purge method deletes collateral'); +} + TODO: { local $TODO = "Tests to make later"; ok(0, 'Test exportAssetData method');