Skip to content

Commit 33426a1

Browse files
committed
Add missing test for Commit action
Not every message should be responded to.
1 parent 3520b10 commit 33426a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test_marvin_actions.py

+5
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ def testCommitResponse(self):
332332
expected = f"Använd detta meddelandet: '{message}'"
333333
self.assertActionOutput(marvin_actions.marvinCommit, "commit", expected)
334334

335+
def testCommitReaction(self):
336+
"""Test that marvin only generates commit messages when asked"""
337+
self.assertActionSilent(marvin_actions.marvinCommit, "nocommit")
338+
339+
335340
def testCommitError(self):
336341
"""Tests that marvin sends the proper message when get commit fails"""
337342
with mock.patch("marvin_actions.requests.get", side_effect=Exception('API Down!')):

0 commit comments

Comments
 (0)