mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 07:56:28 +00:00 
			
		
		
		
	Add tests for mini-dashboard status and assets
This commit is contained in:
		
							
								
								
									
										24
									
								
								meilisearch-http/tests/dashboard/mod.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								meilisearch-http/tests/dashboard/mod.rs
									
									
									
									
									
										Normal 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); | ||||
|     } | ||||
| } | ||||
| @@ -1,4 +1,5 @@ | ||||
| mod common; | ||||
| mod dashboard; | ||||
| mod documents; | ||||
| mod index; | ||||
| mod search; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user