tests: add tests for resources controller

This commit is contained in:
Stavros
2026-03-28 20:34:38 +02:00
parent 39beed706b
commit 23e0da96a6
3 changed files with 87 additions and 38 deletions

View File

@@ -3,6 +3,7 @@ package controller_test
import (
"encoding/json"
"net/http/httptest"
"os"
"slices"
"strings"
"testing"
@@ -344,4 +345,10 @@ func TestUserController(t *testing.T) {
test.run(t, router, recorder)
})
}
err = db.Close()
assert.NoError(t, err)
err = os.Remove("/tmp/tinyauth_test.db")
assert.NoError(t, err)
}