21 lines
324 B
Go
21 lines
324 B
Go
package user_test
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
"net/http/httptest"
|
|
"testing"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func TestLogin(t *testing.T) {
|
|
gin.SetMode(gin.TestMode)
|
|
app := gin.Default()
|
|
|
|
w := httptest.NewRecorder()
|
|
req, _ := http.NewRequest("POST", "/api/v1/user/login", nil)
|
|
app.ServeHTTP(w, req)
|
|
fmt.Println(w)
|
|
}
|