diff options
Diffstat (limited to 'tests/commit/commit.c')
| -rw-r--r-- | tests/commit/commit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/commit/commit.c b/tests/commit/commit.c index 38397d2df..f5461cfd3 100644 --- a/tests/commit/commit.c +++ b/tests/commit/commit.c @@ -38,8 +38,12 @@ void test_commit_commit__create_unexisting_update_ref(void) cl_git_pass(git_commit_create(&oid, _repo, "refs/heads/foo/bar", s, s, NULL, "some msg", tree, 1, (const git_commit **) &commit)); + /* fail because the parent isn't the tip of the branch anymore */ + cl_git_fail(git_commit_create(&oid, _repo, "refs/heads/foo/bar", s, s, + NULL, "some msg", tree, 1, (const git_commit **) &commit)); + cl_git_pass(git_reference_lookup(&ref, _repo, "refs/heads/foo/bar")); - cl_assert(!git_oid_cmp(&oid, git_reference_target(ref))); + cl_assert_equal_oid(&oid, git_reference_target(ref)); git_tree_free(tree); git_commit_free(commit); |
