summaryrefslogtreecommitdiff
path: root/gemini/roundtrip_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'gemini/roundtrip_test.go')
-rw-r--r--gemini/roundtrip_test.go12
1 files changed, 6 insertions, 6 deletions
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)
}