summaryrefslogtreecommitdiff
path: root/api/auth_test.go
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2024-04-03 17:53:50 -0600
committerElizabeth Hunt <elizabeth@simponic.xyz>2024-04-03 17:53:50 -0600
commitf38e8719c2a8537fe9b64ed8ceca45858a58e498 (patch)
tree5cf2c7c7f6396f75bdb841db00638e4eef8e81e8 /api/auth_test.go
parente398cf05402c010d594cea4e2dea307ca1a36dbe (diff)
downloadhatecomputers.club-f38e8719c2a8537fe9b64ed8ceca45858a58e498.tar.gz
hatecomputers.club-f38e8719c2a8537fe9b64ed8ceca45858a58e498.zip
make it compile
Diffstat (limited to 'api/auth_test.go')
-rw-r--r--api/auth_test.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/api/auth_test.go b/api/auth_test.go
deleted file mode 100644
index 45ca12e..0000000
--- a/api/auth_test.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package api_test
-
-import (
- "database/sql"
- "os"
- "testing"
-
- "git.hatecomputers.club/hatecomputers/hatecomputers.club/api"
- "git.hatecomputers.club/hatecomputers/hatecomputers.club/args"
- "git.hatecomputers.club/hatecomputers/hatecomputers.club/database"
- "git.hatecomputers.club/hatecomputers/hatecomputers.club/utils"
-)
-
-func setup() (*sql.DB, *api.RequestContext, func()) {
- randomDb := utils.RandomId()
-
- testDb := database.MakeConn(&randomDb)
- database.Migrate(testDb)
-
- context := &api.RequestContext{
- DBConn: testDb,
- Args: &args.Arguments{},
- TemplateData: &(map[string]interface{}{}),
- }
-
- return testDb, context, func() {
- testDb.Close()
- os.Remove(randomDb)
- }
-}
-
-/*
-todo: test api key creation
-+ api key attached to user
-+ user session is unique
-+ goLogin goes to page in cookie
-*/