AbstractQueryChangesTest: Add stub test for "query:" predicate

Add a stub test which only tests that the correct response is returned
when the predicate is used with a non-existing user query.

Tests for existing user queries will be added in a followup commit.

Change-Id: I5fd7a703d52e238ccc91038f1575a87c2c71b5f0
This commit is contained in:
David Pursehouse
2018-04-16 16:42:08 +02:00
parent ace569abb1
commit b24340bdf5

View File

@@ -2115,6 +2115,14 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
.isEqualTo("Unknown named destination: foo");
}
@Test
public void userQuery() throws Exception {
TestRepository<Repo> repo = createProject("repo");
insert(repo, newChange(repo));
assertThatQueryException("query:foo").hasMessageThat().isEqualTo("Unknown named query: foo");
}
protected ChangeInserter newChange(TestRepository<Repo> repo) throws Exception {
return newChange(repo, null, null, null, null);
}