Groups probe tests
Robert 'phaylon' Sedlacek [Tue, 8 May 2012 18:36:18 +0000 (18:36 +0000)]
t/groups.t [new file with mode: 0644]

diff --git a/t/groups.t b/t/groups.t
new file mode 100644 (file)
index 0000000..bba6548
--- /dev/null
@@ -0,0 +1,14 @@
+use strictures 1;
+use Test::More;
+
+use System::Introspector::Groups;
+
+my $probe = System::Introspector::Groups->new;
+my $data  = $probe->gather;
+
+ok scalar(keys %$data), 'received group data';
+ok not(grep { not defined $_->{gid} } values %$data), 'all have gid';
+ok not(grep { not defined $_->{name} } values %$data), 'all have name';
+ok not(grep { not defined $_->{users} } values %$data), 'all have users';
+
+done_testing;