def test_canAddStoryToPivotal(self):
     tracker = self.pivotal_
     name = "test_canAddStoryToPivotal"
     description = "this is a test"
     item = PivotalTrackerItem(Story()).withSummary(name).withDescription(description)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.summary(), name)
     self.assertEqual(item.description(), description)
 def test_summaryAndDescriptionValidForItemWhenSeededWithExistingValidStorySummaryAndDescription(self):
     story = Story()
     description = "Hello World"
     summary = "HW"
     story.description = description
     story.name = summary
     item = PivotalTrackerItem(story)
     self.assertEqual(item.summary(), summary)
     self.assertEqual(item.description(), description)
 def test_itemConstructedWithDecoratedStoryWithJiraKeyGetsValidDescriptionWithHTTPS(self):
     story = Story()
     jiraUrl = "https://www.jira.com/TEST-pa1234"
     description = "this is a test\nwith\nmultiple\nlines" 
     decoratedDescription = "https://www.jira.com/TEST-pa1234\n" + description
     story.SetDescription(decoratedDescription)
     item = PivotalTrackerItem(story)
     self.assertEqual(item.description(), description)
     self.assertEqual(item.jiraUrl(), jiraUrl)
 def test_canAddStoryToPivotal(self):
     tracker = self.pivotal_
     name = "test_canAddStoryToPivotal"
     description = "this is a test"
     item = PivotalTrackerItem(
         Story()).withSummary(name).withDescription(description)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.summary(), name)
     self.assertEqual(item.description(), description)
Exemplo n.º 5
0
 def test_summaryAndDescriptionValidForItemWhenSeededWithExistingValidStorySummaryAndDescription(
         self):
     story = Story()
     description = "Hello World"
     summary = "HW"
     story.description = description
     story.name = summary
     item = PivotalTrackerItem(story)
     self.assertEqual(item.summary(), summary)
     self.assertEqual(item.description(), description)
Exemplo n.º 6
0
 def test_itemConstructedWithDecoratedStoryWithJiraKeyGetsValidDescriptionWithHTTPS(
         self):
     story = Story()
     jiraUrl = "https://www.jira.com/TEST-pa1234"
     description = "this is a test\nwith\nmultiple\nlines"
     decoratedDescription = "https://www.jira.com/TEST-pa1234\n" + description
     story.SetDescription(decoratedDescription)
     item = PivotalTrackerItem(story)
     self.assertEqual(item.description(), description)
     self.assertEqual(item.jiraUrl(), jiraUrl)
 def test_canUpdateItemAlreadyInPivotal(self):
     tracker = self.pivotal_
     item = PivotalTrackerItem().withSummary("test_canUpdateItemAlreadyInPivotal-to update").withDescription("can update?")
     tracker.update(item)
     item = next(tracker.items())
     newSummary = "test_canUpdateItemAlreadyInPivotal-1"
     newDescription = "yep - updated"
     item.withSummary(newSummary).withDescription(newDescription)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.summary(), newSummary)
     self.assertEqual(item.description(), newDescription)
 def test_canUpdateItemAlreadyInPivotal(self):
     tracker = self.pivotal_
     item = PivotalTrackerItem().withSummary(
         "test_canUpdateItemAlreadyInPivotal-to update").withDescription(
             "can update?")
     tracker.update(item)
     item = next(tracker.items())
     newSummary = "test_canUpdateItemAlreadyInPivotal-1"
     newDescription = "yep - updated"
     item.withSummary(newSummary).withDescription(newDescription)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.summary(), newSummary)
     self.assertEqual(item.description(), newDescription)
 def test_canAddAndUpdateJiraLinksToPivotalStories(self):
     tracker = self.pivotal_
     newUrl = "https://www.jira.com/TEST-pa1234"
     jiraTicketKey = "TEST-pa1234"
     description = "this is a test\nwith\nmultiple\nlines"
     item = PivotalTrackerItem().withSummary("test_canAddAndUpdateJiraLinksToPivotalStories").withDescription(description)
     item.withJiraUrl("http://www.jira.com/TEST-pa1234").withJiraKey(jiraTicketKey)
     tracker.update(item)
     item = next(tracker.items())
     item.withJiraUrl(newUrl)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.jiraUrl(), newUrl)
     self.assertEqual(item.jiraKey(), jiraTicketKey)
     self.assertEqual(item.description(), description)
 def test_canAddAndUpdateJiraLinksToPivotalStories(self):
     tracker = self.pivotal_
     newUrl = "https://www.jira.com/TEST-pa1234"
     jiraTicketKey = "TEST-pa1234"
     description = "this is a test\nwith\nmultiple\nlines"
     item = PivotalTrackerItem().withSummary(
         "test_canAddAndUpdateJiraLinksToPivotalStories").withDescription(
             description)
     item.withJiraUrl("http://www.jira.com/TEST-pa1234").withJiraKey(
         jiraTicketKey)
     tracker.update(item)
     item = next(tracker.items())
     item.withJiraUrl(newUrl)
     tracker.update(item)
     item = next(tracker.items())
     self.assertEqual(item.jiraUrl(), newUrl)
     self.assertEqual(item.jiraKey(), jiraTicketKey)
     self.assertEqual(item.description(), description)