Home / Function/ TestContextFileNotFound() — gin Function Reference

TestContextFileNotFound() — gin Function Reference

Architecture documentation for the TestContextFileNotFound() function in context_file_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  8f50a820_615a_f289_aae2_8f10aec48385["TestContextFileNotFound()"]
  fa0cdbd7_ab43_fdb7_04e2_ac002df4c609["context_file_test.go"]
  8f50a820_615a_f289_aae2_8f10aec48385 -->|defined in| fa0cdbd7_ab43_fdb7_04e2_ac002df4c609
  style 8f50a820_615a_f289_aae2_8f10aec48385 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

context_file_test.go lines 27–35

func TestContextFileNotFound(t *testing.T) {
	w := httptest.NewRecorder()
	c, _ := CreateTestContext(w)
	c.Request = httptest.NewRequest(http.MethodGet, "/test", nil)

	c.File("non_existent_file.txt")

	assert.Equal(t, http.StatusNotFound, w.Code)
}

Domain

Subdomains

Frequently Asked Questions

What does TestContextFileNotFound() do?
TestContextFileNotFound() is a function in the gin codebase, defined in context_file_test.go.
Where is TestContextFileNotFound() defined?
TestContextFileNotFound() is defined in context_file_test.go at line 27.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free