From 33d0199bbeb068a45a411c5f8dba77f6574656ad Mon Sep 17 00:00:00 2001 From: tjpcc Date: Tue, 2 May 2023 08:56:10 -0600 Subject: fix tests and examples to match the router.Handler() change --- router_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'router_test.go') diff --git a/router_test.go b/router_test.go index 5430de7..ebcbce8 100644 --- a/router_test.go +++ b/router_test.go @@ -42,7 +42,7 @@ func TestRouterUse(t *testing.T) { request, err := gemini.ParseRequest(bytes.NewBufferString("/\r\n")) require.Nil(t, err) - response := r.Handler(context.Background(), request) + response := r.Handler().Handle(context.Background(), request) require.NotNil(t, response) body, err := io.ReadAll(response.Body) @@ -64,7 +64,7 @@ func TestRouterMount(t *testing.T) { request, err := gemini.ParseRequest(bytes.NewBufferString("/foo/bar\r\n")) require.Nil(t, err) - response := outer.Handler(context.Background(), request) + response := outer.Handler().Handle(context.Background(), request) require.NotNil(t, response) body, err := io.ReadAll(response.Body) @@ -75,6 +75,6 @@ func TestRouterMount(t *testing.T) { request, err = gemini.ParseRequest(bytes.NewBufferString("/foo\r\n")) require.Nil(t, err) - response = outer.Handler(context.Background(), request) + response = outer.Handler().Handle(context.Background(), request) require.Nil(t, response) } -- cgit v1.2.3