]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5411/test-0002-pre-receive-declined.sh
proc-receive hook tests: use "test_hook" instead of "write_script"
[thirdparty/git.git] / t / t5411 / test-0002-pre-receive-declined.sh
index 0c3490c9b1b4483f68a9d1ea26455a77a934e69c..98a9d13041a05d7eee850feccba01c20a39497e2 100644 (file)
@@ -1,6 +1,6 @@
 test_expect_success "setup pre-receive hook ($PROTOCOL)" '
        mv "$upstream/hooks/pre-receive" "$upstream/hooks/pre-receive.ok" &&
-       write_script "$upstream/hooks/pre-receive" <<-EOF
+       test_hook -C "$upstream" --clobber pre-receive <<-\EOF
        exit 1
        EOF
 '
@@ -21,7 +21,7 @@ test_expect_success "git-push is declined ($PROTOCOL)" '
        EOF
        test_cmp expect actual &&
 
-       test_cmp_refs -C "$upstream" <<-EOF
+       test_cmp_refs -C "$upstream" <<-\EOF
        <COMMIT-A> refs/heads/main
        EOF
 '