Skip to content

Commit 9607874

Browse files
committed
test(git): add test case for is_staging_clean
1 parent b36594d commit 9607874

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_git.py

+11
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,14 @@ def test_get_latest_tag_name(tmp_commitizen_project):
152152
cmd.run("git tag 1.0")
153153
tag_name = git.get_latest_tag_name()
154154
assert tag_name == "1.0"
155+
156+
157+
def test_is_staging_clean(tmp_commitizen_project):
158+
with tmp_commitizen_project.as_cwd():
159+
assert git.is_staging_clean() is True
160+
161+
cmd.run("touch test_file")
162+
cmd.run("git add test_file")
163+
cmd.run("echo 'test' > test_file")
164+
165+
assert git.is_staging_clean() is False

0 commit comments

Comments
 (0)