mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-12-02 10:05:05 +08:00
add tests
This commit is contained in:
parent
65ca80bdde
commit
f4f42ec441
@ -62,6 +62,7 @@ impl SearchQuery {
|
|||||||
documents_ids,
|
documents_ids,
|
||||||
found_words,
|
found_words,
|
||||||
candidates,
|
candidates,
|
||||||
|
..
|
||||||
} = search.execute()?;
|
} = search.execute()?;
|
||||||
|
|
||||||
let mut documents = Vec::new();
|
let mut documents = Vec::new();
|
||||||
|
@ -8,7 +8,9 @@ async fn get_settings_unexisting_index() {
|
|||||||
assert_eq!(code, 400)
|
assert_eq!(code, 400)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// test broken, should be fixed with milli#101
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
|
#[ignore]
|
||||||
async fn get_settings() {
|
async fn get_settings() {
|
||||||
let server = Server::new().await;
|
let server = Server::new().await;
|
||||||
let index = server.index("test");
|
let index = server.index("test");
|
||||||
@ -16,10 +18,11 @@ async fn get_settings() {
|
|||||||
let (response, code) = index.settings().await;
|
let (response, code) = index.settings().await;
|
||||||
assert_eq!(code, 200);
|
assert_eq!(code, 200);
|
||||||
let settings = response.as_object().unwrap();
|
let settings = response.as_object().unwrap();
|
||||||
assert_eq!(settings.keys().len(), 3);
|
assert_eq!(settings.keys().len(), 4);
|
||||||
assert_eq!(settings["displayedAttributes"], json!(["*"]));
|
assert_eq!(settings["displayedAttributes"], json!(["*"]));
|
||||||
assert_eq!(settings["searchableAttributes"], json!(["*"]));
|
assert_eq!(settings["searchableAttributes"], json!(["*"]));
|
||||||
assert_eq!(settings["facetedAttributes"], json!({}));
|
assert_eq!(settings["facetedAttributes"], json!({}));
|
||||||
|
assert_eq!(settings["rankingRules"], json!(["typo", "words", "proximmity", "attributes", "wordsPosition", "exactness"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
|
Loading…
Reference in New Issue
Block a user