From: Robert 'phaylon' Sedlacek Date: Mon, 7 May 2012 21:16:07 +0000 (+0000) Subject: Users probe tests X-Git-Tag: v0.001_001~123 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a2598396c37fd1e556890d35f59c729a9c81dfa2;p=scpubgit%2FSystem-Introspector.git Users probe tests --- diff --git a/t/users.t b/t/users.t new file mode 100644 index 0000000..f74f42a --- /dev/null +++ b/t/users.t @@ -0,0 +1,15 @@ +use strictures 1; +use Test::More; + +use System::Introspector::Users; + +my $probe = System::Introspector::Users->new; +my $data = $probe->gather; + +ok((my $user = $data->{ $> }), 'found own user'); +ok(defined($user->{ $_ }), "$_ is defined") + for qw( comment crontab gid groups home shell ssh uid username ); +ok(not(exists $user->{crontab}{error}), 'no crontab error'); +ok(not(exists $user->{ssh}{keys}{error}), 'no ssh keys error'); + +done_testing;