12345678910111213141516171819202122 |
- package debug_test
- import (
- "kpt-tmr-group/http/util/httptt"
- "net/http"
- "net/http/httptest"
- "testing"
- "github.com/stretchr/testify/assert"
- )
- func TestHelloOk(t *testing.T) {
- t.Run("ok", func(t *testing.T) {
- g, ctrl, _ := fakeServer(t)
- defer ctrl.Finish()
- req := httptt.NewRequest(t, http.MethodGet, "/debug/test", nil)
- rw := httptest.NewRecorder()
- g.ServeHTTP(rw, req)
- assert.Equal(t, http.StatusOK, rw.Code)
- })
- }
|