kegani-cli 0.1.0

CLI tool for Kegani framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Integration test template
//!
//! Add your API integration tests here.

use actix_web::{test, App};

// Example test — replace with actual API tests
#[actix_web::test]
async fn test_health_endpoint() {
    let app = test::init_service(App::new().route("/health", actix_web::web::get().to(|| {
        actix_web::HttpResponse::Ok().json(serde_json::json!({"status": "ok"}))
    }))).await;

    let req = test::TestRequest::get().uri("/health").to_request();
    let resp = test::call_service(&app, req).await;
    assert!(resp.status().is_success());
}