Commits

Wayne Werner  committed 25ed9e1

Got estimates, version, and backlog order

  • Participants
  • Parent commits 5e668f7

Comments (0)

Files changed (2)

     if due is not None:
         task.due = due
     if original_estimate is not None:
-        pass
-
+        task.original_estimate = original_estimate
     if current_estimate is not None:
-        pass
+       task.current_estimate = current_estimate
     if version is not None:
-        pass
+        task.version = version
     if backlog_order is not None:
-        pass
+        task.backlog_order = backlog_order
     if area is not None:
-        pass
+        task.area = None
     if parent_case is not None:
-        pass
+        task.parent_case = None
 
 
     session.add(task)
         task = slayer.get_task(id)
         self.assertEqual(expected_due, task.due)
 
+    def test_whenEditTaskIsCalledWithOriginalEstimateItShouldBeUpdated(self):
+        expected_original_estimate = 13
+        id = slayer.add_task().id
+        slayer.edit_task(id, original_estimate=expected_original_estimate)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_original_estimate, task.original_estimate)
+
+    def test_whenEditTaskIsCalledWithCurrentEstimateItShouldBeUpdated(self):
+        expected_current_estimate = 13
+        id = slayer.add_task().id
+        slayer.edit_task(id, current_estimate=expected_current_estimate)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_current_estimate, task.current_estimate)
+
+    def test_whenEditTaskIsCalledWithVersionItShouldBeUpdated(self):
+        expected_version = '1.4'
+        id = slayer.add_task().id
+        slayer.edit_task(id, version=expected_version)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_version, task.version)
+
+    def test_whenEditTaskIsCalledWithBacklogOrderItShouldBeUpdated(self):
+        expected_backlog_order = 42
+        id = slayer.add_task().id
+        slayer.edit_task(id, backlog_order=expected_backlog_order)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_backlog_order, task.backlog_order)
+
     ##############
     # User Tests #
     ##############