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

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

Analyze Your Own Codebase

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

Try Supermodel Free