From 9a2da81b11ad0064cca24ce7974827d032309369 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 1 May 2023 07:56:25 -0600 Subject: name change gus -> sliderule --- gemini/roundtrip_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gemini/roundtrip_test.go') diff --git a/gemini/roundtrip_test.go b/gemini/roundtrip_test.go index e8d2b48..67b1ae0 100644 --- a/gemini/roundtrip_test.go +++ b/gemini/roundtrip_test.go @@ -12,15 +12,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "tildegit.org/tjp/gus" - "tildegit.org/tjp/gus/gemini" + sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/gemini" ) func TestRoundTrip(t *testing.T) { tlsConf, err := gemini.FileTLS("./testdata/server.crt", "./testdata/server.key") require.Nil(t, err) - handler := gus.HandlerFunc(func(ctx context.Context, req *gus.Request) *gus.Response { + handler := sr.HandlerFunc(func(ctx context.Context, req *sr.Request) *sr.Response { return gemini.Success("text/gemini", bytes.NewBufferString("you've found my page")) }) @@ -36,7 +36,7 @@ func TestRoundTrip(t *testing.T) { require.Nil(t, err) cli := gemini.NewClient(testClientTLS()) - response, err := cli.RoundTrip(&gus.Request{URL: u}) + response, err := cli.RoundTrip(&sr.Request{URL: u}) require.Nil(t, err) assert.Equal(t, gemini.StatusSuccess, response.Status) @@ -54,10 +54,10 @@ func TestTitanRequest(t *testing.T) { require.Nil(t, err) invoked := false - handler := gus.HandlerFunc(func(ctx context.Context, request *gus.Request) *gus.Response { + handler := sr.HandlerFunc(func(ctx context.Context, request *sr.Request) *sr.Response { invoked = true - body := ctx.Value(gemini.TitanRequestBody) + body := gemini.GetTitanRequestBody(request) if !assert.NotNil(t, body) { return gemini.Success("", nil) } -- cgit v1.2.3