Append submitted info to the change REST endpoint.

Add a timestamp indicating when a change was submitted.  This info
only appears when a change has been submitted.

Feature: Issue 3579
Change-Id: I76a50214e367c2c01ef666e46e3ed6fa2d652a50
This commit is contained in:
Khai Do
2016-01-07 14:07:54 -08:00
parent 8dcf701224
commit 96a7caf010
7 changed files with 53 additions and 0 deletions

View File

@@ -724,6 +724,25 @@ public class ChangeIT extends AbstractDaemonTest {
.topic()).isEqualTo("");
}
@Test
public void submitted() throws Exception {
PushOneCommit.Result r = createChange();
gApi.changes()
.id(r.getChangeId())
.revision(r.getCommit().name())
.review(ReviewInput.approve());
assertThat(gApi.changes()
.id(r.getChangeId())
.info().submitted).isNull();
gApi.changes()
.id(r.getChangeId())
.revision(r.getCommit().name())
.submit();
assertThat(gApi.changes()
.id(r.getChangeId())
.info().submitted).isNotNull();
}
@Test
public void check() throws Exception {
// TODO(dborowitz): Re-enable when ConsistencyChecker supports notedb.