Skip to content

Commit

Permalink
fix tests for tags with # in front
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Riedel committed Jul 12, 2022
1 parent 4b024ef commit 99c74dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_check_jira_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_empty_commit_msg_but_comments(mock_ini, mock_commit_msg_file, cli_runne
assert "Commit message is empty." in result.output


@pytest.mark.parametrize("commit_msg", ["message", "tag", "tag-", "#tag", "#tag-123"])
@pytest.mark.parametrize("commit_msg", ["message", "message tag", "message tag-", "message #tag", "message #tag-123", "tag message", "tag- message"])
def test_missing_tag(commit_msg, mock_ini, mock_commit_msg_file, cli_runner):
"""Assert error on missing tag."""
mock_commit_msg_file.write_text(commit_msg)
Expand All @@ -128,7 +128,7 @@ def test_missing_tag(commit_msg, mock_ini, mock_commit_msg_file, cli_runner):
assert "'TAG' tag not found" in result.output


@pytest.mark.parametrize("commit_msg", ["TAG", "TAG-", "#TAG", "#TAG-"])
@pytest.mark.parametrize("commit_msg", ["message TAG", "message TAG-", "message #TAG", "message #TAG-", "TAG message", "TAG- message"])
def test_missing_tag_number(commit_msg, mock_ini, mock_commit_msg_file, cli_runner):
"""Assert error on missing tag number."""
mock_commit_msg_file.write_text(commit_msg)
Expand Down

0 comments on commit 99c74dd

Please sign in to comment.