mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
add authorize_typo_test
This commit is contained in:
parent
c4653347fd
commit
f782fe2062
2 changed files with 53 additions and 3 deletions
|
@ -1009,4 +1009,18 @@ pub(crate) mod tests {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn put_and_retrieve_disable_typo() {
|
||||
let index = TempIndex::new();
|
||||
let mut txn = index.write_txn().unwrap();
|
||||
// default value is true
|
||||
assert!(index.authorize_typos(&txn).unwrap());
|
||||
// set to false
|
||||
index.put_authorize_typos(&mut txn, false).unwrap();
|
||||
txn.commit().unwrap();
|
||||
|
||||
let txn = index.read_txn().unwrap();
|
||||
assert!(!index.authorize_typos(&txn).unwrap());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue