Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-10-14 21:23:46 +0000
committerSteffen Pingel2011-10-14 21:23:46 +0000
commitc94353f4681fe65c488c6e753a3a432acd648ebe (patch)
treee788f2bd800f81f1594dcea987963821e12f7f7c /org.eclipse.mylyn.trac.tests/src/org
parent39b557b0fea24a89310d2493e44dc00b1a30c8c1 (diff)
downloadorg.eclipse.mylyn.tasks-c94353f4681fe65c488c6e753a3a432acd648ebe.tar.gz
org.eclipse.mylyn.tasks-c94353f4681fe65c488c6e753a3a432acd648ebe.tar.xz
org.eclipse.mylyn.tasks-c94353f4681fe65c488c6e753a3a432acd648ebe.zip
NEW - bug 348049: Trac changes to attribute default value not reflected
until restart https://bugs.eclipse.org/bugs/show_bug.cgi?id=348049
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
index a7d411bd3..50f0b0917 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
@@ -22,6 +22,7 @@ import java.util.List;
import junit.framework.TestCase;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.mylyn.internal.trac.core.TracAttribute;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
import org.eclipse.mylyn.internal.trac.core.client.TracException;
@@ -31,6 +32,7 @@ import org.eclipse.mylyn.internal.trac.core.client.TracRemoteException;
import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
+import org.eclipse.mylyn.internal.trac.core.model.TracTicketField;
import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
import org.eclipse.mylyn.tests.util.TestUtil;
import org.eclipse.mylyn.tests.util.TestUtil.Credentials;
@@ -218,6 +220,19 @@ public class TracClientTest extends TestCase {
assertEquals("2.0", versions[1].getName());
}
+ public void testUpdateAttributesChangedTicketFields() throws Exception {
+ client = fixture.connect(fixture.getRepositoryUrl());
+ client.updateAttributes(new NullProgressMonitor(), true);
+ // modify field to bogus value
+ TracTicketField field = client.getTicketFieldByName(TracAttribute.MILESTONE.getTracKey());
+ field.setDefaultValue("modified default value");
+
+ // updating should reset modified field
+ client.updateAttributes(new NullProgressMonitor(), true);
+ field = client.getTicketFieldByName(TracAttribute.MILESTONE.getTracKey());
+ assertEquals("", field.getDefaultValue());
+ }
+
public void testValidate() throws Exception {
Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);

Back to the top