Packages::Apt probe tests
Robert 'phaylon' Sedlacek [Mon, 7 May 2012 20:52:17 +0000 (20:52 +0000)]
t/packages-apt.t [new file with mode: 0644]

diff --git a/t/packages-apt.t b/t/packages-apt.t
new file mode 100644 (file)
index 0000000..ac30cb8
--- /dev/null
@@ -0,0 +1,15 @@
+use strictures 1;
+use Test::More;
+
+use System::Introspector::Packages::Apt;
+
+my $probe = System::Introspector::Packages::Apt->new;
+my $data  = $probe->gather;
+
+ok(scalar(keys %$data), 'received packages');
+ok(
+    not(grep { not exists $_->{version} } values %{$data->{installed}}),
+    'versions',
+);
+
+done_testing;