Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.trac.tests')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
index bdeaec988..8804f5db8 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryConnectorTest.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Steffen Pingel - initial API and implementation
+ * Benjamin Muskalla (Tasktop Technologies) - support for deleting tasks
*******************************************************************************/
package org.eclipse.mylyn.trac.tests.core;
@@ -316,4 +317,18 @@ public class TracRepositoryConnectorTest extends TestCase {
assertEquals(new Date(123 * 1000), task.getCompletionDate());
}
+ public void testDeleteNewTask() throws Exception {
+ ITracClient client = connector.getClientManager().getTracClient(repository);
+ TracTicket ticket = TracTestUtil.createTicket(client, "testDeleteNewTask");
+ String taskId = String.valueOf(ticket.getId());
+ ITask task = TracTestUtil.createTask(repository, taskId);
+ assertTrue(connector.canDeleteTask(repository, task));
+ connector.deleteTask(repository, task, null);
+ try {
+ connector.getTaskData(repository, taskId, null);
+ fail("Task should be gone");
+ } catch (CoreException e) {
+ assertTrue(e.getMessage().contains("does not exist"));
+ }
+ }
}

Back to the top