2 Commits

Author SHA1 Message Date
shahariaz
2c42206345 test: increase coverage to 98.9% by covering previously untested code paths
- ginS: add TestLoadHTMLGlob, TestLoadHTMLFiles, TestLoadHTMLFS covering the
  three HTML template loader wrappers (73.1% -> 100%)
- ginS: add TestRunError, TestRunTLSError, TestRunUnixError, TestRunFdError
  covering all four server-start wrappers via fast-failing error paths
- binding: add TestPlainBindingBody covering plainBinding.BindBody (string,
  []byte, unsupported type, and nil receiver branches)
- render: add TestRedirectWriteContentType covering the Redirect no-op method

Overall project coverage: 98.5% -> 98.9%
Patch coverage: 100%
2026-06-02 21:15:55 +06:00
Milad
c358d5656d
test(gin): Add comprehensive test coverage for ginS package (#4442)
* test(ginS): add comprehensive test coverage for ginS package

Improve test coverage for ginS package by adding 18 test functions covering HTTP methods, routing, middleware, static files, and templates.

* use http.Method* constants instead of raw strings in gins_test.go

* copyright updated in gins_test.go

---------

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-11-27 23:01:57 +08:00