diff options
author | Nik Everett <nik9000@gmail.com> | 2016-12-13 19:02:35 -0500 |
---|---|---|
committer | Nik Everett <nik9000@gmail.com> | 2016-12-13 20:28:41 -0500 |
commit | 49bdd29f91eb3568a8bac28e043f422a208104d1 (patch) | |
tree | 20db54c93ae50c1ef55f6e1753a009cbbd8a2b90 /core/src/test/java/org/elasticsearch/script/ScriptTests.java | |
parent | 0d195f1afa3e6a9769d8d327909da6921ab300ae (diff) |
Consolidate more parser creation into ESTestCase
This will make it easier to add the forthcoming required argument,
`NamedXContentRegistry`.
Diffstat (limited to 'core/src/test/java/org/elasticsearch/script/ScriptTests.java')
-rw-r--r-- | core/src/test/java/org/elasticsearch/script/ScriptTests.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/src/test/java/org/elasticsearch/script/ScriptTests.java b/core/src/test/java/org/elasticsearch/script/ScriptTests.java index c1c25a500b..4ad02460d4 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptTests.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptTests.java @@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.OutputStreamStreamOutput; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.test.ESTestCase; @@ -45,7 +44,7 @@ public class ScriptTests extends ESTestCase { Script expectedScript = createScript(xContent); try (XContentBuilder builder = XContentBuilder.builder(xContent)) { expectedScript.toXContent(builder, ToXContent.EMPTY_PARAMS); - try (XContentParser parser = XContentHelper.createParser(builder.bytes())) { + try (XContentParser parser = createParser(builder)) { Script actualScript = Script.parse(parser, ParseFieldMatcher.STRICT); assertThat(actualScript, equalTo(expectedScript)); } |