about summary refs log tree commit diff stats
path: root/http
diff options
context:
space:
mode:
Diffstat (limited to 'http')
-rw-r--r--http/handler.go2
-rw-r--r--http/handler_test.go31
2 files changed, 18 insertions, 15 deletions
diff --git a/http/handler.go b/http/handler.go
index 1de6b8c..47a6e37 100644
--- a/http/handler.go
+++ b/http/handler.go
@@ -4,7 +4,7 @@ package http
 import (
 	"net/http"
 
-	g "maragu.dev/gomponents"
+	g "go.alanpearce.eu/gomponents"
 )
 
 // Handler is like [http.Handler] but returns a [g.Node] and an error.
diff --git a/http/handler_test.go b/http/handler_test.go
index 453e3e7..6f3aa7c 100644
--- a/http/handler_test.go
+++ b/http/handler_test.go
@@ -7,8 +7,8 @@ import (
 	"net/http/httptest"
 	"testing"
 
-	g "maragu.dev/gomponents"
-	ghttp "maragu.dev/gomponents/http"
+	g "go.alanpearce.eu/gomponents"
+	ghttp "go.alanpearce.eu/gomponents/http"
 )
 
 func TestAdapt(t *testing.T) {
@@ -51,18 +51,21 @@ func TestAdapt(t *testing.T) {
 		}
 	})
 
-	t.Run("errors with status code if error implements StatusCode method and renders node", func(t *testing.T) {
-		h := ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (g.Node, error) {
-			return g.El("div"), statusCodeError{http.StatusTeapot}
-		})
-		code, body := get(t, h)
-		if code != http.StatusTeapot {
-			t.Fatal("status code is", code)
-		}
-		if body != "<div></div>" {
-			t.Fatal(`body is`, body)
-		}
-	})
+	t.Run(
+		"errors with status code if error implements StatusCode method and renders node",
+		func(t *testing.T) {
+			h := ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (g.Node, error) {
+				return g.El("div"), statusCodeError{http.StatusTeapot}
+			})
+			code, body := get(t, h)
+			if code != http.StatusTeapot {
+				t.Fatal("status code is", code)
+			}
+			if body != "<div></div>" {
+				t.Fatal(`body is`, body)
+			}
+		},
+	)
 
 	t.Run("errors with 500 if other error and renders node", func(t *testing.T) {
 		h := ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (g.Node, error) {