Set '_more_groups' on last group of query result
If the number of groups matching the query exceeds the limit the last group has a '_more_groups: true' JSON field set. Change-Id: I6f1fcda58813e2c7b5dc788d88b989c377afec7e Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -193,8 +193,10 @@ public abstract class AbstractQueryGroupsTest extends GerritServerTests {
|
||||
String query =
|
||||
"uuid:" + group1.id + " OR uuid:" + group2.id + " OR uuid:" + group3.id;
|
||||
List<GroupInfo> result = assertQuery(query, group1, group2, group3);
|
||||
assertThat(result.get(result.size() - 1)._moreGroups).isNull();
|
||||
|
||||
assertQuery(newQuery(query).withLimit(2), result.subList(0, 2));
|
||||
result = assertQuery(newQuery(query).withLimit(2), result.subList(0, 2));
|
||||
assertThat(result.get(result.size() - 1)._moreGroups).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user