summaryrefslogtreecommitdiff
path: root/gemini/response_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'gemini/response_test.go')
-rw-r--r--gemini/response_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/gemini/response_test.go b/gemini/response_test.go
index 00166dd..784e00a 100644
--- a/gemini/response_test.go
+++ b/gemini/response_test.go
@@ -6,15 +6,15 @@ import (
"io"
"testing"
- sr "tildegit.org/tjp/sliderule"
+ "tildegit.org/tjp/sliderule/internal/types"
"tildegit.org/tjp/sliderule/gemini"
)
func TestBuildResponses(t *testing.T) {
table := []struct {
name string
- response *sr.Response
- status sr.Status
+ response *types.Response
+ status types.Status
meta string
body string
}{
@@ -154,7 +154,7 @@ func TestBuildResponses(t *testing.T) {
func TestParseResponses(t *testing.T) {
table := []struct {
input string
- status sr.Status
+ status types.Status
meta string
body string
err error
@@ -233,7 +233,7 @@ func TestParseResponses(t *testing.T) {
func TestResponseClose(t *testing.T) {
body := &rdCloser{Buffer: bytes.NewBufferString("the body here")}
- resp := &sr.Response{
+ resp := &types.Response{
Status: gemini.StatusSuccess,
Meta: "text/gemini",
Body: body,
@@ -247,7 +247,7 @@ func TestResponseClose(t *testing.T) {
t.Error("response body was not closed by response.Close()")
}
- resp = &sr.Response{
+ resp = &types.Response{
Status: gemini.StatusInput,
Meta: "give me more",
}
@@ -270,8 +270,8 @@ func (rc *rdCloser) Close() error {
func TestResponseWriteTo(t *testing.T) {
// invariant under test: WriteTo() sends the same bytes as Read()
- clone := func(resp *sr.Response) *sr.Response {
- other := &sr.Response{
+ clone := func(resp *types.Response) *types.Response {
+ other := &types.Response{
Status: resp.Status,
Meta: resp.Meta,
}
@@ -297,7 +297,7 @@ func TestResponseWriteTo(t *testing.T) {
table := []struct {
name string
- response *sr.Response
+ response *types.Response
}{
{
name: "simple success",