summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-07-19 05:28:16 (EDT)
committer Gerrit Code Review @ Eclipse.org2013-07-24 09:26:59 (EDT)
commit777a2d22a2680649fbfd7de928aa71a32f812c25 (patch)
tree67b06c4cebd92e5e04b586828723aba6d3b9b64f
parente24076a539e81b26f591abb9f11b673b615200b4 (diff)
downloadorg.eclipse.mylyn.reviews-777a2d22a2680649fbfd7de928aa71a32f812c25.zip
org.eclipse.mylyn.reviews-777a2d22a2680649fbfd7de928aa71a32f812c25.tar.gz
org.eclipse.mylyn.reviews-777a2d22a2680649fbfd7de928aa71a32f812c25.tar.bz2
add a test asserting that a change cannot be rebased when up to daterefs/changes/88/14688/3
Change-Id: Ib2e63e1d9d07bcff3360d6e70e0ae7e5bc2f05e2 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactoryTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactoryTest.java b/org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactoryTest.java
index b23bbac..3319473 100644
--- a/org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactoryTest.java
+++ b/org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactoryTest.java
@@ -307,4 +307,14 @@ public class GerritReviewRemoteFactoryTest extends GerritRemoteTest {
new NullProgressMonitor());
assertThat(reviewerResult.getErrors().isEmpty(), is(true));
}
+
+ @Test
+ public void testCannotRebaseChangeAlreadyUpToDate() throws Exception {
+ try {
+ reviewHarness.client.rebase(reviewHarness.shortId, 1, new NullProgressMonitor());
+ fail("Expected to fail when rebasing a change that is already up to date");
+ } catch (GerritException e) {
+ assertThat(e.getMessage(), is("Change is already up to date."));
+ }
+ }
}