-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
mod common; | ||
mod dashboard; | ||
mod documents; | ||
mod index; | ||
mod search; | ||
|