summaryrefslogtreecommitdiff
path: root/tests/remote
diff options
context:
space:
mode:
authorEtienne Samson <samson.etienne@gmail.com>2018-06-20 02:27:12 +0200
committerEtienne Samson <samson.etienne@gmail.com>2018-11-02 14:58:12 +0100
commitfdb116b364c59d1e3692441963ec47616c71b3db (patch)
treed9a0e5192a96ac7dd4b26fb2ab3735a54e968198 /tests/remote
parent3cbaebdf7dac02b193f3416937c9cdb2e244f50b (diff)
downloadlibgit2-fdb116b364c59d1e3692441963ec47616c71b3db.tar.gz
remote: add a creation flag for ignoring url.insteadOf
Diffstat (limited to 'tests/remote')
-rw-r--r--tests/remote/create.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/remote/create.c b/tests/remote/create.c
index cbc60962d..9c51ed64b 100644
--- a/tests/remote/create.c
+++ b/tests/remote/create.c
@@ -311,6 +311,23 @@ void test_remote_create__with_opts_detached(void)
git_remote_free(remote);
}
+
+void test_remote_create__with_opts_insteadof_disabled(void)
+{
+ git_remote *remote;
+ git_remote_create_options opts = GIT_REMOTE_CREATE_OPTIONS_INIT;
+
+ opts.repository = _repo;
+ opts.flags = GIT_REMOTE_CREATE_SKIP_INSTEADOF;
+
+ cl_git_pass(git_remote_create_with_opts(&remote, "http://example.com/libgit2/libgit2", &opts));
+
+ cl_assert_equal_s(git_remote_url(remote), "http://example.com/libgit2/libgit2");
+ cl_assert_equal_p(git_remote_pushurl(remote), NULL);
+
+ git_remote_free(remote);
+}
+
static int create_with_name(git_remote **remote, git_repository *repo, const char *name, const char *url)
{
git_remote_create_options opts = GIT_REMOTE_CREATE_OPTIONS_INIT;