DiskUsage probe tests
Robert 'phaylon' Sedlacek [Wed, 9 May 2012 01:40:27 +0000 (01:40 +0000)]
t/diskusage.t [new file with mode: 0644]

diff --git a/t/diskusage.t b/t/diskusage.t
new file mode 100644 (file)
index 0000000..6499aa3
--- /dev/null
@@ -0,0 +1,15 @@
+use strictures 1;
+use Test::More;
+
+use System::Introspector::DiskUsage;
+
+my $probe = System::Introspector::DiskUsage->new;
+my $data  = $probe->gather;
+
+ok scalar(@$data), 'received data';
+my @fields = qw( filesystem blocks_1024 used available capacity mount_point );
+for my $field (@fields) {
+    ok not(grep { not defined $_->{$field} } @$data), "all have $field";
+}
+
+done_testing;