DraftChangeIT: Hoist createDraftChange up to AbstractDaemonTest
So it can be used by other tests. Rename the createDraftChange test method in CreateChangeIT to avoid compilation errors. Change-Id: Ib8b08b30a5b635e230eb102ba75871d8756f8179
This commit is contained in:
@@ -101,13 +101,13 @@ public class CreateChangeIT extends AbstractDaemonTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createDraftChange() throws Exception {
|
||||
public void createNewDraftChange() throws Exception {
|
||||
assume().that(isAllowDrafts()).isTrue();
|
||||
assertCreateSucceeds(newChangeInput(ChangeStatus.DRAFT));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createDraftChangeNotAllowed() throws Exception {
|
||||
public void createNewDraftChangeNotAllowed() throws Exception {
|
||||
assume().that(isAllowDrafts()).isFalse();
|
||||
ChangeInput ci = newChangeInput(ChangeStatus.DRAFT);
|
||||
assertCreateFails(ci, MethodNotAllowedException.class,
|
||||
|
||||
@@ -147,10 +147,6 @@ public class DraftChangeIT extends AbstractDaemonTest {
|
||||
assertThat(label.all.get(0).value).isEqualTo(1);
|
||||
}
|
||||
|
||||
private PushOneCommit.Result createDraftChange() throws Exception {
|
||||
return pushTo("refs/drafts/master");
|
||||
}
|
||||
|
||||
private static RestResponse deleteChange(String changeId,
|
||||
RestSession s) throws IOException {
|
||||
return s.delete("/changes/" + changeId);
|
||||
|
||||
Reference in New Issue
Block a user