Fixed bug in where branch links were always pointing at master.
[catagits/Gitalist.git] / t / 02git_project.t
index 9472a9e..acd2e04 100644 (file)
@@ -25,7 +25,9 @@ is($proj->info->{name}, qw/repo1/, 'repo name in info hash');
 
 ok($proj->heads, '->heads returns stuff');
      
-is($proj->head_hash, qw/36c6c6708b8360d7023e8a1649c45bcf9b3bd818/, 'head_hash for HEAD is correct');
+is($proj->head_hash, '36c6c6708b8360d7023e8a1649c45bcf9b3bd818', 'head_hash for HEAD is correct');
+is($proj->head_hash('refs/heads/master'), '36c6c6708b8360d7023e8a1649c45bcf9b3bd818', 'head_hash for refs/heads/master is correct');
+is($proj->head_hash('rafs/head/mister'), undef, 'head_hash for rafs/head/mister is undef');
 
 is(scalar $proj->list_tree, 2, 'expected number of entries in tree');
 isa_ok(($proj->list_tree)[1], 'Gitalist::Git::Object');