diff options
Diffstat (limited to 'tests/online/push.c')
-rw-r--r-- | tests/online/push.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/online/push.c b/tests/online/push.c index 6da27bb96..c351827d9 100644 --- a/tests/online/push.c +++ b/tests/online/push.c @@ -204,6 +204,8 @@ static void verify_tracking_branches(git_remote *remote, expected_ref expected_r cl_assert_equal_i(branch_type, GIT_BRANCH_REMOTE); cl_git_pass(git_vector_insert(&actual_refs, git__strdup(git_reference_name(ref)))); + + git_reference_free(ref); } cl_assert_equal_i(error, GIT_ITEROVER); @@ -852,6 +854,9 @@ void test_online_push__notes(void) const char *specs[] = { "refs/notes/commits:refs/notes/commits" }; push_status exp_stats[] = { { "refs/notes/commits", 1 } }; expected_ref exp_refs[] = { { "refs/notes/commits", &expected_oid } }; + const char *specs_del[] = { ":refs/notes/commits" }; + expected_ref exp_refs_del[] = { }; + git_oid_fromstr(&expected_oid, "8461a99b27b7043e58ff6e1f5d2cf07d282534fb"); target_oid = &_oid_b6; @@ -864,5 +869,11 @@ void test_online_push__notes(void) exp_stats, ARRAY_SIZE(exp_stats), exp_refs, ARRAY_SIZE(exp_refs), 0, 1, 1); + /* And make sure to delete the note */ + + do_push(specs_del, ARRAY_SIZE(specs_del), + exp_stats, 1, + exp_refs_del, ARRAY_SIZE(exp_refs_del), 0, 0, 0); + git_signature_free(signature); } |