| 1 |
from commitizen.cz.jira import JiraSmartCz |
| 2 |
|
| 3 |
|
| 4 |
def test_questions(config): |
| 5 |
cz = JiraSmartCz(config) |
| 6 |
questions = cz.questions() |
| 7 |
assert isinstance(questions, list) |
| 8 |
assert isinstance(questions[0], dict) |
| 9 |
|
| 10 |
|
| 11 |
def test_answer(config): |
| 12 |
cz = JiraSmartCz(config) |
| 13 |
answers = { |
| 14 |
"message": "new test", |
| 15 |
"issues": "JRA-34", |
| 16 |
"workflow": "", |
| 17 |
"time": "", |
| 18 |
"comment": "", |
| 19 |
} |
| 20 |
message = cz.message(answers) |
| 21 |
assert message == "new test JRA-34" |
| 22 |
|
| 23 |
|
| 24 |
def test_example(config): |
| 25 |
cz = JiraSmartCz(config) |
| 26 |
assert "JRA-34 #comment corrected indent issue\n" in cz.example() |
| 27 |
|
| 28 |
|
| 29 |
def test_schema(config): |
| 30 |
cz = JiraSmartCz(config) |
| 31 |
assert "<ignored text>" in cz.schema() |
| 32 |
|
| 33 |
|
| 34 |
def test_info(config): |
| 35 |
cz = JiraSmartCz(config) |
| 36 |
assert ( |
| 37 |
"Smart Commits allow repository committers to perform " |
| 38 |
"actions such as transitioning JIRA Software" |
| 39 |
) in cz.info() |