remote: assert what we want to happen when ther is no default branch

Assert what we already do, so as to notice changes.
This commit is contained in:
Carlos Martín Nieto 2014-08-10 17:48:12 +02:00
parent 26bf3a5346
commit 94412b009e

View File

@ -48,3 +48,17 @@ void test_network_remote_defaultbranch__master_on_detached(void)
cl_git_pass(git_repository_detach_head(g_repo_a, NULL, NULL)); cl_git_pass(git_repository_detach_head(g_repo_a, NULL, NULL));
assert_default_branch("refs/heads/master"); assert_default_branch("refs/heads/master");
} }
void test_network_remote_defaultbranch__no_default_branch(void)
{
git_remote *remote_b;
const git_remote_head **heads;
size_t len;
cl_git_pass(git_remote_create(&remote_b, g_repo_b, "self", git_repository_path(g_repo_b)));
cl_git_pass(git_remote_connect(remote_b, GIT_DIRECTION_FETCH));
cl_git_pass(git_remote_ls(&heads, &len, remote_b));
cl_assert_equal_i(0, len);
git_remote_free(remote_b);
}