Commit f778af68 by Etienne Samson

tests: git_remote_create_anonymous

parent fa69195e
......@@ -125,3 +125,24 @@ void test_remote_create__with_fetchspec_invalid_url(void)
{
cl_git_assert_cannot_create_remote(GIT_EINVALIDSPEC, git_remote_create_with_fetchspec(&r, _repo, NULL, "", NULL));
}
void test_remote_create__anonymous(void)
{
git_remote *remote;
git_strarray array;
cl_git_pass(git_remote_create_anonymous(&remote, _repo, TEST_URL));
cl_assert_equal_s(git_remote_name(remote), NULL);
cl_assert_equal_s(git_remote_url(remote), TEST_URL);
cl_git_pass(git_remote_get_fetch_refspecs(&array, remote));
cl_assert_equal_i(0, array.count);
git_strarray_free(&array);
git_remote_free(remote);
}
void test_remote_create__anonymous_invalid_url(void)
{
cl_git_assert_cannot_create_remote(GIT_EINVALIDSPEC, git_remote_create_anonymous(&r, _repo, ""));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment