Test a closing that cannot tell whether the epic is closed

This commit is contained in:
2026-11-19 01:08:25 +01:00
parent f671d44747
commit fa933affe6
+7
View File
@@ -93,6 +93,13 @@ class ClosingTheEpic(DoEpicTest):
self.assertIn("cannot close the epic ABC-12: it is closed already, so its summary is posted\n", err)
self.assertEqual(self.store.comments, {})
def test_says_why_it_cannot_tell_whether_the_epic_is_closed(self) -> None:
class Unreadable(MemoryEpic):
def closed(self) -> Failure:
return Failure("Jira answered 503")
self.assertEqual(finish.closed("ABC-12", Unreadable("ABC-12", list(REVIEWED)), io.StringIO("Shipped.")), Failure("cannot close the epic ABC-12: Jira answered 503"))
def test_the_jira_backend_closes_an_epic_by_the_transition_the_settings_name(self) -> None:
with open(self.home / ".claude-projects/do-epic/config.toml", "a", encoding="utf-8") as settings:
settings.write('jira-finish-transition = "Mark as done"\njira-finish-status = "Done"\n')