-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(stack-setup): put hooks at the right place (#549)
This adds test coverage to stack_setup to ensure we don't break this again.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import pathlib | ||
import typing | ||
|
||
import pytest | ||
|
||
from mergify_cli.stack import setup | ||
from mergify_cli.tests import utils as test_utils | ||
|
||
|
||
async def test_setup( | ||
git_mock: test_utils.GitMock, | ||
tmp_path: pytest.TempdirFactory, | ||
) -> None: | ||
hooks_dir = typing.cast(pathlib.Path, tmp_path) / ".git" / "hooks" | ||
hooks_dir.mkdir(parents=True) | ||
git_mock.mock("rev-parse", "--git-path", "hooks", output=str(hooks_dir)) | ||
await setup.stack_setup() | ||
|
||
hook = hooks_dir / "commit-msg" | ||
assert hook.exists() |