RevisionIT.cherryPick: Assert WIP flag on target change, not on source change

Change-Id: I77d47c8c6f8311f3845f43cdd0589be84743ac7c
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin 2018-10-17 10:13:29 +02:00
parent 950ce2633d
commit 55021e7e33
1 changed files with 4 additions and 3 deletions

View File

@ -315,7 +315,6 @@ public class RevisionIT extends AbstractDaemonTest {
ChangeInfo changeInfoWithDetails =
gApi.changes().id(project.get() + "~master~" + r.getChangeId()).get();
assertThat(changeInfoWithDetails.workInProgress).isNull();
Collection<ChangeMessageInfo> messages = changeInfoWithDetails.messages;
assertThat(messages).hasSize(2);
@ -330,8 +329,10 @@ public class RevisionIT extends AbstractDaemonTest {
origIt.next();
assertThat(origIt.next().message).isEqualTo(expectedMessage);
assertThat(cherry.get().messages).hasSize(1);
Iterator<ChangeMessageInfo> cherryIt = cherry.get().messages.iterator();
ChangeInfo cherryPickChangeInfoWithDetails = cherry.get();
assertThat(cherryPickChangeInfoWithDetails.workInProgress).isNull();
assertThat(cherryPickChangeInfoWithDetails.messages).hasSize(1);
Iterator<ChangeMessageInfo> cherryIt = cherryPickChangeInfoWithDetails.messages.iterator();
expectedMessage = "Patch Set 1: Cherry Picked from branch master.";
assertThat(cherryIt.next().message).isEqualTo(expectedMessage);