about summary refs log tree commit diff stats
path: root/http/handler_test.go
diff options
context:
space:
mode:
authorAlan Pearce2025-03-19 12:20:24 +0100
committerAlan Pearce2025-03-19 12:20:24 +0100
commit3a9a1fd26540ddd0299771a729740cdd88239dde (patch)
tree6a65ad391fa2ff3d52132643502739e9645f56a7 /http/handler_test.go
parent5eae1eef0f0a090ae569a23c0c52db356a109cfc (diff)
downloadgomponents-3a9a1fd26540ddd0299771a729740cdd88239dde.tar.lz
gomponents-3a9a1fd26540ddd0299771a729740cdd88239dde.tar.zst
gomponents-3a9a1fd26540ddd0299771a729740cdd88239dde.zip
Rename and document fork v1.2.0
Diffstat (limited to 'http/handler_test.go')
-rw-r--r--http/handler_test.go31
1 files changed, 17 insertions, 14 deletions
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) {