This commit is contained in:
Владимир Федоров
2025-07-20 04:44:00 +07:00
parent 3cfa44b99c
commit 729015c4ea
7 changed files with 85 additions and 51 deletions
+8 -1
View File
@@ -11,7 +11,14 @@ import (
func Test_WriteRequest(t *testing.T) {
b := &strings.Builder{}
WriteRequest(b, "GET", "example.ru", "/", "HTTP/1.0", nil)
WriteRequest(
b,
&Request{
Method: "GET",
Path: "/",
Protocol: "HTTP/1.0",
},
)
assert.Equal(t, "GET / HTTP/1.0\r\n\r\n", b.String())
}