Commits

Wayne Werner committed 3e50f8e

Got the edit contact and status passing

  • Participants
  • Parent commits c98c347

Comments (0)

Files changed (2)

     if type is not None:
         task.type = type
     if status is not None:
-        raise ArgumentError()
+        task.status = status
     if assigned_to is not None:
-        raise ArgumentError()
+        task.assigned_to = assigned_to
     if contact is not None:
-        raise ArgumentError()
+        task.contact = contact
     if priority is not None:
-        raise ArgumentError()
+        pass
     if due is not None:
-        raise ArgumentError()
+        pass
     if original_estimate is not None:
-        raise ArgumentError()
+        pass
     if current_estimate is not None:
-        raise ArgumentError()
+        pass
     if version is not None:
-        raise ArgumentError()
+        pass
     if backlog_order is not None:
-        raise ArgumentError()
+        pass
     if area is not None:
-        raise ArgumentError()
+        pass
     if parent_case is not None:
-        raise ArgumentError()
+        pass
 
 
     session.add(task)
         task = slayer.get_task(id)
         self.assertEqual(expected_type, task.type)
 
+    def test_whenEditTaskIsCalledWithStatusItShouldBeUpdated(self):
+        expected_status = 'Newed'
+        id = slayer.add_task().id
+        slayer.edit_task(id, status=expected_status)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_status, task.status)
+
+    def test_whenEditTaskIsCalledWithAssignedToItShouldBeUpdated(self):
+        expected_assigned_to = 'Puff, the magic dragon'
+        id = slayer.add_task().id
+        slayer.edit_task(id, assigned_to=expected_assigned_to)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_assigned_to, task.assigned_to)
+
+    def test_whenEditTaskIsCalledWithContactItShouldBeUpdated(self):
+        expected_contact = '3-2-1'
+        id = slayer.add_task().id
+        slayer.edit_task(id, contact=expected_contact)
+        task = slayer.get_task(id)
+        self.assertEqual(expected_contact, task.contact)
 
     ##############
     # User Tests #