GetAgreements: Include autoverify group in output

The auto verify group will be needed in the "new agreement" screen to
determine whether or not to enable the "submit" button.

Factor the initialization of the agreement info out to a utility class
so it can also be used by the "get server info" endpoint.

Change-Id: I8572e189b653a51310c630fcba20790bf70e5640
This commit is contained in:
David Pursehouse
2016-08-23 00:11:26 +09:00
parent e9d0b55694
commit 0512b9fdcc
4 changed files with 82 additions and 6 deletions

View File

@@ -107,6 +107,8 @@ public class AgreementsIT extends AbstractDaemonTest {
assertThat(info.name).isEqualTo(ca.getName());
assertThat(info.description).isEqualTo(ca.getDescription());
assertThat(info.url).isEqualTo(ca.getAgreementUrl());
assertThat(info.autoVerifyGroup.name)
.isEqualTo(ca.getAutoVerify().getName());
// Signing the same agreement again has no effect
gApi.accounts().self().signAgreement(ca.getName());