18 lines
338 B
Go

package main
import "testing"
import "github.com/gavv/httpexpect/v2"
func startServer(t *testing.T) {
start(t.Context(), ServerConfig{
Datasource: ":memory:",
})
}
func TestGetUsers(t *testing.T) {
startServer(t)
e := httpexpect.Default(t, "http://localhost:8080/api")
e.GET("/users").Expect().
Status(200).JSON().IsArray()
}