tests: git_remote_create_anonymous
diff --git a/tests/remote/create.c b/tests/remote/create.c
index a7e7a72..28605c1 100644
--- a/tests/remote/create.c
+++ b/tests/remote/create.c
@@ -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, ""));
+}