Skip to content

Commit

Permalink
add some test for git hook trust with no option 💛
Browse files Browse the repository at this point in the history
  • Loading branch information
ocebr committed Aug 12, 2024
1 parent cd073b5 commit 89f5359
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/step-081.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fi

mkdir -p /tmp/test081 && cd /tmp/test081 && git init || exit 1

# Run with --local option
git hooks trust --local &&
[ -f .githooks/trust-all ] &&
[ "$(git config --local --get githooks.trust.all)" = "Y" ] ||
Expand Down Expand Up @@ -37,7 +38,11 @@ git hooks trust forget --global &&
[ -z "$(git config --global --get githooks.trust.all)" ] &&
git hooks trust forget --global||
exit 6

# Run with no option, default should be local
git hooks trust &&
[ -f .githooks/trust-all ] &&
[ "$(git config --local --get githooks.trust.all)" = "Y" ] ||
exit 7
# Check the Git alias
git hooks trust --local &&
git hooks trust revoke &&
Expand Down

0 comments on commit 89f5359

Please sign in to comment.