From 29ca8271b36d73e061fdebbb271a8e38d6ca0063 Mon Sep 17 00:00:00 2001 From: mpostma Date: Wed, 4 Aug 2021 11:02:17 +0200 Subject: [PATCH] test dumpv1 format regression --- .../src/index_controller/dump_actor/loaders/v1.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/meilisearch-http/src/index_controller/dump_actor/loaders/v1.rs b/meilisearch-http/src/index_controller/dump_actor/loaders/v1.rs index c0c7b8ef2..c19ba4329 100644 --- a/meilisearch-http/src/index_controller/dump_actor/loaders/v1.rs +++ b/meilisearch-http/src/index_controller/dump_actor/loaders/v1.rs @@ -180,3 +180,17 @@ fn import_settings(dir_path: impl AsRef) -> anyhow::Result { Ok(metadata) } + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn settings_format_regression() { + let settings = Settings::default(); + assert_eq!( + r##"{"rankingRules":null,"distinctAttribute":null,"searchableAttributes":null,"displayedAttributes":null,"stopWords":null,"synonyms":null,"attributesForFaceting":null}"##, + serde_json::to_string(&settings).unwrap() + ); + } +}