Home / Function/ Test_Custom_Favicon_URL() — fiber Function Reference

Test_Custom_Favicon_URL() — fiber Function Reference

Architecture documentation for the Test_Custom_Favicon_URL() function in favicon_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  f34bc8f3_cf20_679f_8c10_754bce55c5e7["Test_Custom_Favicon_URL()"]
  058ee3d4_5abb_335a_93ae_b3b07b8cfdd0["favicon_test.go"]
  f34bc8f3_cf20_679f_8c10_754bce55c5e7 -->|defined in| 058ee3d4_5abb_335a_93ae_b3b07b8cfdd0
  style f34bc8f3_cf20_679f_8c10_754bce55c5e7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/favicon/favicon_test.go lines 123–140

func Test_Custom_Favicon_URL(t *testing.T) {
	app := fiber.New()
	const customURL = "/favicon.svg"
	app.Use(New(Config{
		File: "../../.github/testdata/favicon.ico",
		URL:  customURL,
	}))

	app.Get("/", func(_ fiber.Ctx) error {
		return nil
	})

	resp, err := app.Test(httptest.NewRequest(http.MethodGet, customURL, http.NoBody))

	require.NoError(t, err, "app.Test(req)")
	require.Equal(t, fiber.StatusOK, resp.StatusCode, "Status code")
	require.Equal(t, "image/x-icon", resp.Header.Get(fiber.HeaderContentType))
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Custom_Favicon_URL() do?
Test_Custom_Favicon_URL() is a function in the fiber codebase, defined in middleware/favicon/favicon_test.go.
Where is Test_Custom_Favicon_URL() defined?
Test_Custom_Favicon_URL() is defined in middleware/favicon/favicon_test.go at line 123.

Analyze Your Own Codebase

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

Try Supermodel Free