summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactoryTest.java')
-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."));
+ }
+ }
}