More work on project permissions

This commit is contained in:
simon987
2019-02-16 11:47:54 -05:00
parent 03153c4d39
commit e079fc8497
18 changed files with 470 additions and 125 deletions

View File

@@ -3,19 +3,28 @@ package test
import (
"github.com/simon987/task_tracker/api"
"github.com/simon987/task_tracker/config"
"net/http"
"testing"
"time"
)
var testApi *api.WebAPI
var testAdminCtx *http.Client
var testUserCtx *http.Client
func TestMain(m *testing.M) {
config.SetupConfig()
testApi := api.New()
testApi = api.New()
testApi.SetupLogger()
testApi.Database.Reset()
go testApi.Run()
time.Sleep(time.Millisecond * 100)
testAdminCtx = getSessionCtx("testadmin", "testadmin", true)
testUserCtx = getSessionCtx("testuser", "testuser", false)
m.Run()
}