Users probe tests
Robert 'phaylon' Sedlacek [Mon, 7 May 2012 21:16:07 +0000 (21:16 +0000)]
t/users.t [new file with mode: 0644]

diff --git a/t/users.t b/t/users.t
new file mode 100644 (file)
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;