diff options
author | Patrick Steinhardt <ps@pks.im> | 2015-05-21 13:02:22 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2015-05-31 13:26:05 +0200 |
commit | 9e88a823f61a3c1b298b0f33d1a260fdc5ee2fa7 (patch) | |
tree | b8febe1436c59e8865a4a072b389e1f1a33b5980 | |
parent | 771069e1fb9850153e85d4b7c76cbcbf35540cdc (diff) | |
download | libgit2-9e88a823f61a3c1b298b0f33d1a260fdc5ee2fa7.tar.gz |
remote: test insteadOf for anonymous remotes
-rw-r--r-- | tests/remote/insteadof.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/remote/insteadof.c b/tests/remote/insteadof.c index c9b39f098..05d4757cf 100644 --- a/tests/remote/insteadof.c +++ b/tests/remote/insteadof.c @@ -58,3 +58,15 @@ void test_remote_insteadof__pushurl_insteadof_applicable(void) git_remote_pushurl(g_remote), "git@github.com:libgit2/libgit2"); } + +void test_remote_insteadof__anonymous_remote(void) +{ + cl_git_pass(git_repository_open(&g_repo, cl_fixture(REPO_PATH))); + cl_git_pass(git_remote_create_anonymous(&g_remote, g_repo, + "http://example.com/libgit2/libgit2")); + + cl_assert_equal_s( + git_remote_url(g_remote), + "http://github.com/libgit2/libgit2"); + cl_assert_equal_p(git_remote_pushurl(g_remote), NULL); +} |