]> Dogcows Code - chaz/git-codeowners/blobdiff - t/app-codeowners-util.t
configure git user
[chaz/git-codeowners] / t / app-codeowners-util.t
index 2edbcc79122b0f855a341688ff37bc3b4856aaf8..4d7d224961c871a3fef55a9c973bc75a3f161a61 100644 (file)
@@ -44,10 +44,10 @@ subtest 'git_toplevel' => sub {
     my $repodir =_setup_git_repo();
 
     my $r = App::Codeowners::Util::git_toplevel($repodir);
-    is($r, $repodir, 'found toplevel directory from toplevel');
+    is($r->canonpath, $repodir->canonpath, 'found toplevel directory from toplevel');
 
     $r = App::Codeowners::Util::git_toplevel($repodir->child('a/b'));
-    is($r, $repodir, 'found toplevel directory');
+    is($r->canonpath, $repodir->canonpath, 'found toplevel directory');
 };
 
 subtest 'find_nearest_codeowners' => sub {
@@ -90,6 +90,8 @@ sub _setup_git_repo {
     my $repodir = tempdir;
 
     run_git('-C', $repodir, 'init')->wait;
+    run_git('-C', $repodir, qw{config --local user.email app-codeowners@example.com})->wait;
+    run_git('-C', $repodir, qw{config --local user.name App-Codeowners})->wait;
 
     $repodir->child('foo.txt')->touchpath;
     $repodir->child('a/b/c/bar.txt')->touchpath;
This page took 0.024786 seconds and 4 git commands to generate.