Skip to content

Commit

Permalink
Add missing test for Commit action
Browse files Browse the repository at this point in the history
Not every message should be responded to.
  • Loading branch information
kh31d4r authored and mosbth committed Oct 15, 2024
1 parent 768b00a commit 1b94f84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test_marvin_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ def testCommitResponse(self):
expected = f"Använd detta meddelandet: '{message}'"
self.assertActionOutput(marvin_actions.marvinCommit, "commit", expected)

def testCommitReaction(self):
"""Test that marvin only generates commit messages when asked"""
self.assertActionSilent(marvin_actions.marvinCommit, "nocommit")


def testCommitError(self):
"""Tests that marvin sends the proper message when get commit fails"""
with mock.patch("marvin_actions.requests.get", side_effect=Exception('API Down!')):
Expand Down

0 comments on commit 1b94f84

Please sign in to comment.