diff options
| author | Shulhan <ms@kilabit.info> | 2024-02-13 02:14:35 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-02-15 01:12:34 +0700 |
| commit | 372d10a3e1ea01f8d03e44e6ab8be673d05c0773 (patch) | |
| tree | 02df85cae2d4398cfd74ae193b05f490628cc517 /http_server_test.go | |
| parent | bc00c07248b1097f6e8f9281edc659cbd4bdd4ff (diff) | |
| download | gorankusu-372d10a3e1ea01f8d03e44e6ab8be673d05c0773.tar.xz | |
all: move example to root directory
The goal is to remove duplicate code in testing and show the example on
how to create Gorankusu service from godoc.
Implements: https://todo.sr.ht/~shulhan/gorankusu/5
Diffstat (limited to 'http_server_test.go')
| -rw-r--r-- | http_server_test.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/http_server_test.go b/http_server_test.go index 28b3086..8b08c46 100644 --- a/http_server_test.go +++ b/http_server_test.go @@ -111,12 +111,9 @@ func dummyGorankusuServe(t *testing.T, reqparams httpRequestParams) (rawResp []b body.Write(reqparams.body) - var httpreq = httptest.NewRequest( - reqparams.method, - reqparams.path, - &body) + var httpreq = httptest.NewRequest(reqparams.method, reqparams.path, &body) - dummyGorankusu.Httpd.ServeHTTP(recorder, httpreq) + exGorankusu.Httpd.ServeHTTP(recorder, httpreq) var ( httpres = recorder.Result() |
