Commits

Wayne Werner committed 6e225f5

Got edit on due date and priority

  • Participants
  • Parent commits 3e50f8e

Comments (0)

Files changed (2)

     if contact is not None:
         task.contact = contact
     if priority is not None:
-        pass
+        task.priority = priority
     if due is not None:
         pass
     if original_estimate is not None:
         task = slayer.get_task(id)
         self.assertEqual(expected_contact, task.contact)
 
+    def test_whenEditTaskIsCalledWithPriorityItShouldBeUpdated(self):
+        expected_priority = 1
+        id = slayer.add_task().id
+        slayer.edit_task(id, priority=expected_priority)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_priority, task.priority)
+
+    def test_whenEditTaskIsCalledWithDueItShouldBeUpdated(self):
+        expected_due = '1984-08-24'
+        id = slayer.add_task().id
+        slayer.edit_task(id, due=expected_due)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_due, task.due)
+
     ##############
     # User Tests #
     ##############