@@ -109,6 +109,27 @@ def test_bump_major_increment(commit_msg, mocker):
109
109
assert tag_exists is True
110
110
111
111
112
+ @pytest .mark .usefixtures ("tmp_commitizen_project" )
113
+ @pytest .mark .parametrize (
114
+ "commit_msg,increment,expected_tag" ,
115
+ [
116
+ ("feat: new file" , "PATCH" , "0.1.1" ),
117
+ ("fix: username exception" , "major" , "1.0.0" ),
118
+ ("refactor: remove ini configuration support" , "patch" , "0.1.1" ),
119
+ ("BREAKING CHANGE: age is no longer supported" , "minor" , "0.2.0" ),
120
+ ],
121
+ )
122
+ def test_bump_command_increment_option (commit_msg , increment , expected_tag , mocker ):
123
+ create_file_and_commit (commit_msg )
124
+
125
+ testargs = ["cz" , "bump" , "--increment" , increment , "--yes" ]
126
+ mocker .patch .object (sys , "argv" , testargs )
127
+ cli .main ()
128
+
129
+ tag_exists = git .tag_exist (expected_tag )
130
+ assert tag_exists is True
131
+
132
+
112
133
@pytest .mark .usefixtures ("tmp_commitizen_project" )
113
134
def test_bump_command_prelease (mocker ):
114
135
# PRERELEASE
0 commit comments