Set '_more_accounts' on last account of query result
If the number of accounts matching the query exceeds the limit the last account has a '_more_accounts: true' JSON field set. Change-Id: Icc8c34c37c72f7df00bb06c67602bea36a4ae09f Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -252,8 +252,11 @@ public abstract class AbstractQueryAccountsTest extends GerritServerTests {
|
||||
AccountInfo user2 = newAccountWithEmail("user2", "user2@" + domain);
|
||||
AccountInfo user3 = newAccountWithEmail("user3", "user3@" + domain);
|
||||
|
||||
assertQuery(domain, user1, user2, user3);
|
||||
assertQuery(newQuery(domain).withLimit(2), user1, user2);
|
||||
List<AccountInfo> result = assertQuery(domain, user1, user2, user3);
|
||||
assertThat(result.get(result.size() - 1)._moreAccounts).isNull();
|
||||
|
||||
result = assertQuery(newQuery(domain).withLimit(2), user1, user2);
|
||||
assertThat(result.get(result.size() - 1)._moreAccounts).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user