File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 88from commitizen import cmd , exceptions , git
99from pytest_mock import MockFixture
1010
11- from tests .utils import FakeCommand , create_file_and_commit
11+ from tests .utils import FakeCommand , create_file_and_commit , create_tag
1212
1313
1414def test_git_object_eq ():
@@ -239,3 +239,13 @@ def test_eoltypes_get_eol_for_open():
239239 assert git .EOLTypes .get_eol_for_open (git .EOLTypes .NATIVE ) == os .linesep
240240 assert git .EOLTypes .get_eol_for_open (git .EOLTypes .LF ) == "\n "
241241 assert git .EOLTypes .get_eol_for_open (git .EOLTypes .CRLF ) == "\r \n "
242+
243+
244+ def test_create_tag_with_message (tmp_commitizen_project ):
245+ with tmp_commitizen_project .as_cwd ():
246+ create_file_and_commit ("feat(test): test" )
247+ tag_name = "1.0"
248+ tag_message = "test message"
249+ create_tag (tag_name , tag_message )
250+ assert git .get_latest_tag_name () == tag_name
251+ assert git .get_tag_message (tag_name ) == f"'{ tag_message } '"
You can’t perform that action at this time.
0 commit comments