From fc3bda3d3b3de3f14c726c7cfe27fb17e6d282f2 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 10 Jun 2010 19:27:49 -0700 Subject: [PATCH] Remove SKIP for use_ok, and fix surveyJSON accessor. --- t/Asset/Wobject/Survey/Reports.t | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/t/Asset/Wobject/Survey/Reports.t b/t/Asset/Wobject/Survey/Reports.t index 3c559b3b1..79c17a20a 100644 --- a/t/Asset/Wobject/Survey/Reports.t +++ b/t/Asset/Wobject/Survey/Reports.t @@ -19,21 +19,17 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -my $tests = 2; -plan tests => $tests + 1; +plan tests => 3; #---------------------------------------------------------------------------- # put your tests here -my $usedOk = use_ok('WebGUI::Asset::Wobject::Survey'); +use_ok('WebGUI::Asset::Wobject::Survey'); my ($survey); # Returns the contents of the Survey_tempReport table sub getAll { $session->db->buildArrayRefOfHashRefs('select * from Survey_tempReport where assetId = ?', [$survey->getId]) } -SKIP: { - -skip $tests, "Unable to load Survey" unless $usedOk; my $user = WebGUI::User->new( $session, 'new' ); WebGUI::Test->addToCleanup($user); my $import_node = WebGUI::Asset->getImportNode($session); @@ -42,7 +38,7 @@ my $import_node = WebGUI::Asset->getImportNode($session); $survey = $import_node->addChild( { className => 'WebGUI::Asset::Wobject::Survey', } ); isa_ok($survey, 'WebGUI::Asset::Wobject::Survey'); -my $sJSON = $survey->surveyJSON; +my $sJSON = $survey->getSurveyJSON; # Load bare-bones survey, containing a single section (S0) $sJSON->update([0], { variable => 'S0' }); @@ -128,8 +124,6 @@ superhashof({ value => 20, # e.g. score })]); -} - #---------------------------------------------------------------------------- # Cleanup