Test an edit of the release with the tagline, and an empty tagline
This commit is contained in:
@@ -425,6 +425,14 @@ class Editing(unittest.TestCase):
|
||||
self.assertEqual(self.edit(34, {"Release": "0.2.0"}), Written(34))
|
||||
self.assertEqual(self.writes(), [("PUT", f"{ISSUES}/ABC-34", {"fields": {"fixVersions": [{"name": "v0.2.0"}]}})])
|
||||
|
||||
def test_an_edit_of_the_release_and_the_tagline_sends_both(self):
|
||||
self.edit(34, {"Release": "0.2.0", "Tagline": "Count every run."})
|
||||
self.assertEqual(self.writes()[0][2], {"fields": {"summary": "Count every run.", "fixVersions": [{"name": "v0.2.0"}]}})
|
||||
|
||||
def test_an_empty_tagline_fails_before_any_write(self):
|
||||
self.assertEqual(self.edit(34, {"Tagline": "** **"}), Failure("the item has no tagline"))
|
||||
self.assertEqual(self.writes(), [])
|
||||
|
||||
def test_a_release_the_project_has_no_fix_version_for_fails_before_any_write(self):
|
||||
self.assertEqual(self.edit(34, {"Release": "0.3.0"}), Failure("the Jira project ABC has no Fix Version 0.3.0 or v0.3.0; create it in Jira, or file the item under a release it has"))
|
||||
self.assertEqual(self.writes(), [])
|
||||
|
||||
Reference in New Issue
Block a user