< Summary - Backend C Tests - Coverage Report (WSL)

Information
Class: test_auth_handler_c
Assembly: src.backend.tests.unit
File(s): ./src/backend/tests/unit/test_auth_handler.c
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 21
Line coverage: 100%
Branch coverage
50%
Covered branches: 4
Total branches: 8
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 2/18/2026 - 10:50:55 PM Line coverage: 100% (13/13) Branch coverage: 50% (4/8) Total lines: 21 2/18/2026 - 10:50:55 PM Line coverage: 100% (13/13) Branch coverage: 50% (4/8) Total lines: 21

File(s)

./src/backend/tests/unit/test_auth_handler.c

#LineLine coverage
 1#include "../../api/handlers/auth_handler.h"
 2#include "../../api/http_server.h"
 3#include <assert.h>
 4#include <string.h>
 5#include <stdio.h>
 6
 17void test_auth_handler() {
 18  HttpRequest req = {0};
 19  HttpResponse res = {0};
 110  handle_auth_request(&req, &res);
 111  assert(res.status_code == 200);
 112  assert(strcmp(res.content_type, "application/json") == 0);
 113  assert(strstr(res.body, "authenticated") != NULL);
 114  assert(strstr(res.body, "admin") != NULL);
 115  printf("[PASS] Auth handler\n");
 116}
 17
 118int main() {
 119  test_auth_handler();
 120  return 0;
 21}

Methods/Properties