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:
David Pursehouse
2016-02-24 12:03:07 +09:00
parent 97cadbab52
commit 9fb86732b9
3 changed files with 6 additions and 6 deletions

View File

@@ -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,

View File

@@ -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);