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>
This commit is contained in:
bors[bot] 2021-10-27 13:26:42 +00:00 committed by GitHub
commit b9c061ab3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -1,4 +1,5 @@
mod common;
mod dashboard;
mod documents;
mod index;
mod search;