def test_doNotUpdateJiraKeyOnStoryWhenUpdatedWithDuplicate(self):
     story = Story()
     updateJiraId = "TEST-12345"
     story.jira_id = updateJiraId
     item = PivotalTrackerItem(story)
     item.withJiraKey(updateJiraId)
     storyToUpdate = item.decoratedStory()
     self.assertEqual(None, storyToUpdate.GetName())
     self.assertEqual([], storyToUpdate.UPDATE_FIELDS)
예제 #2
0
 def test_doNotUpdateJiraKeyOnStoryWhenUpdatedWithDuplicate(self):
     story = Story()
     updateJiraId = "TEST-12345"
     story.jira_id = updateJiraId
     item = PivotalTrackerItem(story)
     item.withJiraKey(updateJiraId)
     storyToUpdate = item.decoratedStory()
     self.assertEqual(None, storyToUpdate.GetName())
     self.assertEqual([], storyToUpdate.UPDATE_FIELDS)
 def test_canUpdateJiraKeyOnStory(self):
     story = Story()
     story.jira_id = "TEST-pti1234"
     updateJiraId = "TEST-12345"
     item = PivotalTrackerItem(story)
     item.withJiraKey(updateJiraId)
     self.assertEqual(item.jiraKey(), updateJiraId)
     storyToUpdate = item.decoratedStory()
     self.assertEqual("[" + updateJiraId + "]: None", storyToUpdate.GetName())
     self.assertTrue('name' in storyToUpdate.UPDATE_FIELDS)
 def test_previouslyExistingJiraInformationIsNotOverwritternBecauseDecoratedStoryDoesNotYetContainIt(self):
     story = Story()
     jiraId = "blah"
     jiraUrl = "blah2"
     story.jira_id = jiraId
     story.jira_url = jiraUrl
     story.SetName("name")
     story.SetDescription("description")
     item = PivotalTrackerItem(story)
     self.assertEqual(item.jiraKey(), jiraId)
     self.assertEqual(item.jiraUrl(), jiraUrl)
예제 #5
0
 def test_canUpdateJiraKeyOnStory(self):
     story = Story()
     story.jira_id = "TEST-pti1234"
     updateJiraId = "TEST-12345"
     item = PivotalTrackerItem(story)
     item.withJiraKey(updateJiraId)
     self.assertEqual(item.jiraKey(), updateJiraId)
     storyToUpdate = item.decoratedStory()
     self.assertEqual("[" + updateJiraId + "]: None",
                      storyToUpdate.GetName())
     self.assertTrue('name' in storyToUpdate.UPDATE_FIELDS)
예제 #6
0
 def test_previouslyExistingJiraInformationIsNotOverwritternBecauseDecoratedStoryDoesNotYetContainIt(
         self):
     story = Story()
     jiraId = "blah"
     jiraUrl = "blah2"
     story.jira_id = jiraId
     story.jira_url = jiraUrl
     story.SetName("name")
     story.SetDescription("description")
     item = PivotalTrackerItem(story)
     self.assertEqual(item.jiraKey(), jiraId)
     self.assertEqual(item.jiraUrl(), jiraUrl)