Home / Function/ Test_Route_Registration_Prevent_Duplicate_With_Middleware() — fiber Function Reference

Test_Route_Registration_Prevent_Duplicate_With_Middleware() — fiber Function Reference

Architecture documentation for the Test_Route_Registration_Prevent_Duplicate_With_Middleware() function in router_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  7b4a5652_1202_e60d_2701_10cb8e97c758["Test_Route_Registration_Prevent_Duplicate_With_Middleware()"]
  326d7e00_9e4f_d854_0c78_b9c0c93e5537["router_test.go"]
  7b4a5652_1202_e60d_2701_10cb8e97c758 -->|defined in| 326d7e00_9e4f_d854_0c78_b9c0c93e5537
  39fceb5e_fdd3_6f63_9730_22fcbb125d33["registerTreeManipulationRoutes()"]
  7b4a5652_1202_e60d_2701_10cb8e97c758 -->|calls| 39fceb5e_fdd3_6f63_9730_22fcbb125d33
  41dd195e_b100_cef6_19c3_28e0b2a62c05["verifyRequest()"]
  7b4a5652_1202_e60d_2701_10cb8e97c758 -->|calls| 41dd195e_b100_cef6_19c3_28e0b2a62c05
  style 7b4a5652_1202_e60d_2701_10cb8e97c758 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

router_test.go lines 1226–1251

func Test_Route_Registration_Prevent_Duplicate_With_Middleware(t *testing.T) {
	t.Parallel()
	app := New()

	middleware := func(c Ctx) error {
		return c.Next()
	}

	registerTreeManipulationRoutes(app, middleware)
	registerTreeManipulationRoutes(app)

	verifyRequest(t, app, "/dynamically-defined", StatusNotFound)
	require.Equal(t, uint32(6), app.handlersCount)

	verifyRequest(t, app, "/test", StatusOK)
	require.Equal(t, uint32(7), app.handlersCount)

	verifyRequest(t, app, "/dynamically-defined", StatusOK)
	require.Equal(t, uint32(8), app.handlersCount)

	verifyRequest(t, app, "/test", StatusOK)
	require.Equal(t, uint32(9), app.handlersCount)

	verifyRequest(t, app, "/dynamically-defined", StatusOK)
	require.Equal(t, uint32(9), app.handlersCount)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_Route_Registration_Prevent_Duplicate_With_Middleware() do?
Test_Route_Registration_Prevent_Duplicate_With_Middleware() is a function in the fiber codebase, defined in router_test.go.
Where is Test_Route_Registration_Prevent_Duplicate_With_Middleware() defined?
Test_Route_Registration_Prevent_Duplicate_With_Middleware() is defined in router_test.go at line 1226.
What does Test_Route_Registration_Prevent_Duplicate_With_Middleware() call?
Test_Route_Registration_Prevent_Duplicate_With_Middleware() calls 2 function(s): registerTreeManipulationRoutes, verifyRequest.

Analyze Your Own Codebase

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

Try Supermodel Free