package main

import (
	"sparrow/pkg/models"
	"sparrow/services/knowoapi/controllers"
	"testing"

	"github.com/kataras/iris/httptest"
)

func TestController(t *testing.T) {
	e := httptest.New(t, newApp())
	e.POST("/").Expect().Status(httptest.StatusOK)
}

func getToken() string {
	tk := new(controllers.Token)
	user := models.User{
		UserKey:  "f7f2d7e5a8954ff4ef07ce7f77898c3f1dd389038842788346514183b5eff8b53e",
		UserName: "lijian",
		VendorID: "1",
	}
	user.ID = 1
	return tk.TokenMaker(&user)
}
