From: Robert 'phaylon' Sedlacek Date: Wed, 9 May 2012 22:30:00 +0000 (+0000) Subject: test for processes key in result X-Git-Tag: v0.001_001~97 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c39f05c18233803467c373bf9fbbc37c082dc75;p=scpubgit%2FSystem-Introspector.git test for processes key in result --- diff --git a/t/processes.t b/t/processes.t index 5158aae..8e0ca15 100644 --- a/t/processes.t +++ b/t/processes.t @@ -3,11 +3,15 @@ use Test::More; use System::Introspector::Processes; -my $probe = System::Introspector::Processes->new; -my $data = $probe->gather; +my $probe = System::Introspector::Processes->new; +my $result = $probe->gather; + +ok($result, 'got result'); +my $data = $result->{processes}; +ok($data, 'got process data'); ok(@$data, 'received processes'); ok(not(grep { not $_->{pid} } @$data), 'all entries have pid'); -ok(not(grep { not $_->{command} } @$data), 'all entries have command'); +ok(not(grep { not $_->{args} } @$data), 'all entries have args'); done_testing;