AbstractQueryChangesTest: Add byMessageMixedCase test

Test that querying with the "message:" predicate works when the
query string has different case than the source text.

Change-Id: If252a8ca682180c127d93de9b5008cbffa8dcd65
This commit is contained in:
David Pursehouse
2018-06-12 13:36:50 +09:00
parent f8e9f203df
commit db2eb89d11

View File

@@ -630,6 +630,18 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
assertQuery("message:12346", change2);
}
@Test
public void byMessageMixedCase() throws Exception {
TestRepository<Repo> repo = createProject("repo");
RevCommit commit1 = repo.parseBody(repo.commit().message("Hello gerrit").create());
Change change1 = insert(repo, newChangeForCommit(repo, commit1));
RevCommit commit2 = repo.parseBody(repo.commit().message("Hello Gerrit").create());
Change change2 = insert(repo, newChangeForCommit(repo, commit2));
assertQuery("message:gerrit", change2, change1);
assertQuery("message:Gerrit", change2, change1);
}
@Test
public void byLabel() throws Exception {
accountManager.authenticate(AuthRequest.forUser("anotheruser"));