Skip to content

Commit 1900706

Browse files
committed
test(test_cz_customize.py): add the ommited bump_map_major_version_zero in test str
1 parent 1b6a925 commit 1900706

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

tests/test_cz_customize.py

+18-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
1919
bump_pattern = "^(break|new|fix|hotfix)"
2020
bump_map = {"break" = "MAJOR", "new" = "MINOR", "fix" = "PATCH", "hotfix" = "PATCH"}
21+
bump_map_major_version_zero = {"break" = "MINOR", "new" = "MINOR", "fix" = "PATCH", "hotfix" = "PATCH"}
2122
change_type_order = ["perf", "BREAKING CHANGE", "feat", "fix", "refactor"]
2223
info = "This is a customized cz."
2324
@@ -62,6 +63,12 @@
6263
"fix": "PATCH",
6364
"hotfix": "PATCH"
6465
},
66+
"bump_map_major_version_zero": {
67+
"break": "MINOR",
68+
"new": "MINOR",
69+
"fix": "PATCH",
70+
"hotfix": "PATCH"
71+
},
6572
"commit_parser": "^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?",
6673
"changelog_pattern": "^(feature|bug fix)?(!)?",
6774
"change_type_map": {"feature": "Feat", "bug fix": "Fix"},
@@ -117,6 +124,11 @@
117124
new: MINOR
118125
fix: PATCH
119126
hotfix: PATCH
127+
bump_map_major_version_zero:
128+
break: MINOR
129+
new: MINOR
130+
fix: PATCH
131+
hotfix: PATCH
120132
change_type_order: ["perf", "BREAKING CHANGE", "feat", "fix", "refactor"]
121133
info: This is a customized cz.
122134
questions:
@@ -654,11 +666,14 @@ def test_message_without_config(empty_config):
654666
"scope": "users",
655667
"subject": "email pattern corrected",
656668
"is_breaking_change": False,
657-
"body": "",
658-
"footer": "",
669+
"body": "complete content",
670+
"footer": "closes #24",
659671
}
660672
message = conventional_commits.message(answers)
661-
assert message == "fix(users): email pattern corrected"
673+
assert (
674+
message
675+
== "fix(users): email pattern corrected\n\ncomplete content\n\ncloses #24"
676+
)
662677
assert cz.message(answers) == message
663678

664679

0 commit comments

Comments
 (0)