Add a trivial test
Tomas Doran [Sun, 10 Jan 2010 23:35:56 +0000 (23:35 +0000)]
t/02git_Repository.t

index 8f123f5..bf4791b 100644 (file)
@@ -37,11 +37,15 @@ isa_ok($proj->path, 'Path::Class::Dir', 'repository path');
 is($proj->name, qw/repo1/, 'repository name is set');
 is($proj->description, qq/some test repository/, 'repository description loaded');
 isa_ok($proj->last_change, 'DateTime', 'last_change');
-{
-    my $packed = $proj->pack;
-    use Data::Dumper;
-    warn Dumper $packed;
-}
+
+is_deeply $proj->pack, {
+    '__CLASS__' => 'Gitalist::Git::Repository',
+    'is_bare' => 1,
+    'owner' => "T\x{e9}st",
+    'last_change' => '2009-11-12T19:00:34Z',
+    'name' => 'repo1',
+    'description' => 'some test repository'
+};
 
 is_deeply $proj->pack, {
     '__CLASS__' => 'Gitalist::Git::Repository',