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