Fix change messages acceptance tests
In ba5c93d the message "Uploaded patch set 1." was added as a change message on new changes, but the acceptance tests were not updated and are now failing because the change messages are not as expected. Change-Id: Ic6a75700b78d87a9a401ad66cf64f2e1e6d7ae9e
This commit is contained in:
parent
2e1972c953
commit
37ed4b872f
@ -20,7 +20,6 @@ import static com.google.gerrit.acceptance.git.GitUtil.initSsh;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.google.gerrit.acceptance.AbstractDaemonTest;
|
||||
import com.google.gerrit.acceptance.AccountCreator;
|
||||
@ -87,12 +86,13 @@ public class ChangeMessagesIT extends AbstractDaemonTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void noMessages() throws GitAPIException,
|
||||
public void defaultMessage() throws GitAPIException,
|
||||
IOException {
|
||||
String changeId = createChange();
|
||||
ChangeInfo c = getChangeWithMessages(changeId);
|
||||
assertNotNull(c.messages);
|
||||
assertTrue(c.messages.isEmpty());
|
||||
assertEquals(1, c.messages.size());
|
||||
assertEquals("Uploaded patch set 1.", c.messages.get(0).message);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -105,9 +105,10 @@ public class ChangeMessagesIT extends AbstractDaemonTest {
|
||||
postMessage(changeId, secondMessage);
|
||||
ChangeInfo c = getChangeWithMessages(changeId);
|
||||
assertNotNull(c.messages);
|
||||
assertEquals(2, c.messages.size());
|
||||
assertMessage(firstMessage, c.messages.get(0).message);
|
||||
assertMessage(secondMessage, c.messages.get(1).message);
|
||||
assertEquals(3, c.messages.size());
|
||||
assertEquals("Uploaded patch set 1.", c.messages.get(0).message);
|
||||
assertMessage(firstMessage, c.messages.get(1).message);
|
||||
assertMessage(secondMessage, c.messages.get(2).message);
|
||||
}
|
||||
|
||||
private String createChange() throws GitAPIException,
|
||||
|
Loading…
x
Reference in New Issue
Block a user