From 7e6046976a0dfd83cd32c2231ecd361d315ee07e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 27 2015 12:38:43 +0000 Subject: Enhance the edit_issue unit-tests --- diff --git a/tests/test_progitlib.py b/tests/test_progitlib.py index ebea83b..f0b8269 100644 --- a/tests/test_progitlib.py +++ b/tests/test_progitlib.py @@ -170,8 +170,8 @@ class ProgitLibtests(tests.Modeltests): msg = progit.lib.new_issue( session=self.session, repo=repo, - title='Test issue', - content='We should work on this', + title='Test issue #2', + content='We should work on this for the second time', user='foo', ticketfolder=None ) @@ -197,7 +197,27 @@ class ProgitLibtests(tests.Modeltests): msg = progit.lib.edit_issue( session=self.session, issue=issue, + ticketfolder=None) + self.session.commit() + self.assertEqual(msg, 'No changes to edit') + + msg = progit.lib.edit_issue( + session=self.session, + issue=issue, + ticketfolder=None, + title='Test issue #2', + content='We should work on this for the second time', + status='Open', + ) + self.session.commit() + self.assertEqual(msg, 'No changes to edit') + + msg = progit.lib.edit_issue( + session=self.session, + issue=issue, ticketfolder=None, + title='Foo issue #2', + content='We should work on this period', status='Invalid') self.session.commit() self.assertEqual(msg, 'Edited successfully issue #2')