use of com.google.gerrit.extensions.restapi.MethodNotAllowedException in project gerrit by GerritCodeReview.
the class MoveChangeIT method moveCanBeDisabledByConfig.
@Test
@GerritConfig(name = "change.move", value = "false")
public void moveCanBeDisabledByConfig() throws Exception {
PushOneCommit.Result r = createChange();
MethodNotAllowedException thrown = assertThrows(MethodNotAllowedException.class, () -> move(r.getChangeId(), null));
assertThat(thrown).hasMessageThat().contains("move changes endpoint is disabled");
}
Aggregations