(mocker: MockFixture, util: UtilFixture)
| 69 | |
| 70 | |
| 71 | def test_check_jira_fails(mocker: MockFixture, util: UtilFixture): |
| 72 | mock_path = mocker.patch("commitizen.commands.check.Path") |
| 73 | mock_path.return_value.read_text.return_value = ( |
| 74 | "random message for J-2 #fake_command blah" |
| 75 | ) |
| 76 | with pytest.raises(InvalidCommitMessageError, match="commit validation: failed!"): |
| 77 | util.run_cli("-n", "cz_jira", "check", "--commit-msg-file", "some_file") |
| 78 | |
| 79 | |
| 80 | @pytest.mark.parametrize( |