Skip to content

Commit

Permalink
update test for #13 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Cielquan authored Aug 17, 2020
1 parent 26538b2 commit 96baa00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_check_jira_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def test_missing_jira_url(cli_runner):


def test_missing_ini_file(mock_home, cli_runner):
"""Assert error on missing '~/.jira.ini' file."""
result = cli_runner.invoke(main, ["--jira-tag=TAG", "--jira-url=URL", "NO_FILE"])
"""Assert error on missing '~/.jira.ini' file when `--verify`."""
result = cli_runner.invoke(main, ["--jira-tag=TAG", "--verify", "--jira-url=URL", "NO_FILE"])
assert result.exit_code == 1
assert "No '~/.jira.ini' file found." in result.output

Expand All @@ -69,7 +69,7 @@ def test_missing_jira_section(mock_home, cli_runner):
mock_ini = mock_home / ".jira.ini"
mock_ini.write_text("")

result = cli_runner.invoke(main, ["--jira-tag=TAG", "--jira-url=URL", "NO_FILE"])
result = cli_runner.invoke(main, ["--jira-tag=TAG", "--verify", "--jira-url=URL", "NO_FILE"])
assert result.exit_code == 1
assert "No 'jira' section" in result.output

Expand All @@ -79,7 +79,7 @@ def test_missing_conf_key(mock_home, cli_runner):
mock_ini = mock_home / ".jira.ini"
mock_ini.write_text("[jira]\nJIRA_USERNAME=USERNAME\n")

result = cli_runner.invoke(main, ["--jira-tag=TAG", "--jira-url=URL", "NO_FILE"])
result = cli_runner.invoke(main, ["--jira-tag=TAG", "--verify", "--jira-url=URL", "NO_FILE"])

assert result.exit_code == 1
assert "Missing 'JIRA_TOKEN'" in result.output
Expand Down

0 comments on commit 96baa00

Please sign in to comment.