Test account query with limit

Change-Id: I193a77d1f2ac5e664c730226e06541e053cd89d4
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2016-06-30 16:57:02 +02:00
parent d9d518e1f6
commit afa0be9b96

View File

@@ -245,6 +245,17 @@ public abstract class AbstractQueryAccountsTest extends GerritServerTests {
assertQuery("name:" + quote(user2.name), user2);
}
@Test
public void withLimit() throws Exception {
String domain = name("test.com");
AccountInfo user1 = newAccountWithEmail("user1", "user1@" + domain);
AccountInfo user2 = newAccountWithEmail("user2", "user2@" + domain);
AccountInfo user3 = newAccountWithEmail("user3", "user3@" + domain);
assertQuery(domain, user1, user2, user3);
assertQuery(newQuery(domain).withLimit(2), user1, user2);
}
protected AccountInfo newAccount(String username) throws Exception {
return newAccountWithEmail(username, null);
}