add tests

This commit is contained in:
mpostma
2021-02-24 11:15:48 +01:00
parent 3987d17e40
commit 561f29042c
6 changed files with 38 additions and 6 deletions

View File

@ -1,7 +1,8 @@
use tempdir::TempDir;
use actix_web::http::StatusCode;
use byte_unit::{Byte, ByteUnit};
use serde_json::Value;
use actix_web::http::StatusCode;
use tempdir::TempDir;
use urlencoding::encode;
use meilisearch_http::data::Data;
use meilisearch_http::option::{Opt, IndexerOpts};
@ -60,7 +61,7 @@ impl Server {
/// Returns a view to an index. There is no guarantee that the index exists.
pub fn index<'a>(&'a self, uid: impl AsRef<str>) -> Index<'a> {
Index {
uid: uid.as_ref().to_string(),
uid: encode(uid.as_ref()),
service: &self.service,
}
}