Skip to content

Commit

Permalink
Merge #1852
Browse files Browse the repository at this point in the history
1852: Add tests for mini-dashboard status and assets r=curquiza a=CuriousCorrelation

## Summery

Added tests for `mini-dashboard` status including assets.

## Ticket link

PR closes  #1767

Co-authored-by: CuriousCorrelation <CuriousCorrelation@protonmail.com>
  • Loading branch information
bors[bot] and CuriousCorrelation committed Oct 27, 2021
2 parents d905bbf + 6641e7a commit b9c061a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions meilisearch-http/tests/dashboard/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use crate::common::Server;

#[actix_rt::test]
async fn dashboard_assets_load() {
let server = Server::new().await;

mod generated {
include!(concat!(env!("OUT_DIR"), "/generated.rs"));
}

let generated = generated::generate();

for (path, _) in generated.into_iter() {
let path = if path == "index.html" {
// "index.html" redirects to "/"
"/".to_owned()
} else {
"/".to_owned() + path
};

let (_, status_code) = server.service.get(&path).await;
assert_eq!(status_code, 200);
}
}
1 change: 1 addition & 0 deletions meilisearch-http/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod common;
mod dashboard;
mod documents;
mod index;
mod search;
Expand Down

0 comments on commit b9c061a

Please sign in to comment.