t/t5505-remote: test push-refspec in branches-file
authorRamkumar Ramachandra <artagnon@gmail.com>
Sat, 22 Jun 2013 07:58:09 +0000 (13:28 +0530)
committerJunio C Hamano <gitster@pobox.com>
Sun, 23 Jun 2013 07:14:15 +0000 (00:14 -0700)
The test "migrate a remote from named file in $GIT_DIR/branches" reads
the branches-file, but only checks that the url and fetch-refspec are
set correctly. Check that the push-refspec is also set correctly.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5505-remote.sh
index 0e7dfa29a448c743be966b22f642c9b0c7e8e5ae..7ae238b5e26353a040a30e416752493d9c8ed583 100755 (executable)
@@ -764,7 +764,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
                git remote rename origin origin &&
                ! test -f .git/branches/origin &&
                test "$(git config remote.origin.url)" = "$origin_url" &&
-               test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin"
+               test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin" &&
+               test "$(git config remote.origin.push)" = "HEAD:refs/heads/master"
        )
 '