diff --git a/src/test/java/org/elasticsearch/index/mapper/xcontent/MetadataMapperTest.java b/src/test/java/org/elasticsearch/index/mapper/xcontent/MetadataMapperTest.java index ea037ecc220..2190448e156 100644 --- a/src/test/java/org/elasticsearch/index/mapper/xcontent/MetadataMapperTest.java +++ b/src/test/java/org/elasticsearch/index/mapper/xcontent/MetadataMapperTest.java @@ -37,14 +37,14 @@ public class MetadataMapperTest { .startObject() .field("_id", 1) .startObject("file") - .field("_name", "htmlWithoutDateMeta.html") + .field("_name", filename) .field("content", html) .endObject() .endObject().bytes(); Document doc = docMapper.parse(json).rootDoc(); assertThat(doc.get(docMapper.mappers().smartName("file").mapper().names().indexName()), containsString("World")); - assertThat(doc.get(docMapper.mappers().smartName("file.name").mapper().names().indexName()), equalTo("htmlWithoutDateMeta.html")); + assertThat(doc.get(docMapper.mappers().smartName("file.name").mapper().names().indexName()), equalTo(filename)); if (expected == null) { assertThat(doc.getField(docMapper.mappers().smartName("file.date").mapper().names().indexName()), nullValue()); } else {