[TEST] only trim for the comparison
This commit is contained in:
parent
169d06cf9e
commit
f0a8c10c87
|
@ -190,7 +190,7 @@ public class HasChildQueryBuilderTests extends AbstractQueryTestCase<HasChildQue
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testParseFromJSON() throws IOException {
|
public void testParseFromJSON() throws IOException {
|
||||||
String query = copyToStringFromClasspath("/org/elasticsearch/index/query/has-child-with-inner-hits.json").trim();
|
String query = copyToStringFromClasspath("/org/elasticsearch/index/query/has-child-with-inner-hits.json");
|
||||||
HasChildQueryBuilder queryBuilder = (HasChildQueryBuilder) parseQuery(query);
|
HasChildQueryBuilder queryBuilder = (HasChildQueryBuilder) parseQuery(query);
|
||||||
assertEquals(query, queryBuilder.maxChildren(), 1217235442);
|
assertEquals(query, queryBuilder.maxChildren(), 1217235442);
|
||||||
assertEquals(query, queryBuilder.minChildren(), 883170873);
|
assertEquals(query, queryBuilder.minChildren(), 883170873);
|
||||||
|
@ -203,7 +203,7 @@ public class HasChildQueryBuilderTests extends AbstractQueryTestCase<HasChildQue
|
||||||
// now assert that we actually generate the same JSON
|
// now assert that we actually generate the same JSON
|
||||||
XContentBuilder builder = XContentFactory.jsonBuilder().prettyPrint();
|
XContentBuilder builder = XContentFactory.jsonBuilder().prettyPrint();
|
||||||
queryBuilder.toXContent(builder, ToXContent.EMPTY_PARAMS);
|
queryBuilder.toXContent(builder, ToXContent.EMPTY_PARAMS);
|
||||||
assertEquals(query, builder.string());
|
assertEquals(query.trim(), builder.string().trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testToQueryInnerQueryType() throws IOException {
|
public void testToQueryInnerQueryType() throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue