Add post-checkout

This commit is contained in:
Andrew Hare 2020-02-20 02:21:29 -07:00 committed by Anthony Sottile
parent 1c641b1c28
commit 18fa004254
9 changed files with 77 additions and 5 deletions

View file

@ -104,6 +104,16 @@ def test_run_ns_commit_msg():
assert ns.commit_msg_filename == '.git/COMMIT_MSG'
def test_run_ns_post_checkout():
ns = hook_impl._run_ns('post-checkout', True, ('a', 'b', 'c'), b'')
assert ns is not None
assert ns.hook_stage == 'post-checkout'
assert ns.color is True
assert ns.source == 'a'
assert ns.origin == 'b'
assert ns.checkout_type == 'c'
@pytest.fixture
def push_example(tempdir_factory):
src = git_dir(tempdir_factory)