summaryrefslogtreecommitdiffstats
path: root/tests/commands/hook_impl_test.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-08 17:48:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-08 17:48:47 +0000
commit4db15c5b771323f1acdeb06e4acc671856da5ea9 (patch)
tree1cde2767753275f2f87a34a2606b2415a467ff09 /tests/commands/hook_impl_test.py
parentAdding upstream version 2.10.1. (diff)
downloadpre-commit-4db15c5b771323f1acdeb06e4acc671856da5ea9.tar.xz
pre-commit-4db15c5b771323f1acdeb06e4acc671856da5ea9.zip
Adding upstream version 2.11.0.upstream/2.11.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/commands/hook_impl_test.py')
-rw-r--r--tests/commands/hook_impl_test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/commands/hook_impl_test.py b/tests/commands/hook_impl_test.py
index 2fc0146..c38b9ca 100644
--- a/tests/commands/hook_impl_test.py
+++ b/tests/commands/hook_impl_test.py
@@ -97,6 +97,7 @@ def test_run_legacy_recursive(tmpdir):
('pre-push', ['branch_name', 'remote_name']),
('commit-msg', ['.git/COMMIT_EDITMSG']),
('post-commit', []),
+ ('post-merge', ['1']),
('post-checkout', ['old_head', 'new_head', '1']),
# multiple choices for commit-editmsg
('prepare-commit-msg', ['.git/COMMIT_EDITMSG']),
@@ -157,6 +158,14 @@ def test_run_ns_post_commit():
assert ns.color is True
+def test_run_ns_post_merge():
+ ns = hook_impl._run_ns('post-merge', True, ('1',), b'')
+ assert ns is not None
+ assert ns.hook_stage == 'post-merge'
+ assert ns.color is True
+ assert ns.is_squash_merge == '1'
+
+
def test_run_ns_post_checkout():
ns = hook_impl._run_ns('post-checkout', True, ('a', 'b', 'c'), b'')
assert ns is not None