summaryrefslogtreecommitdiff
path: root/handlers_test.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2026-06-22 19:57:20 +0200
committerxengineering <me@xengineering.eu>2026-06-22 20:10:43 +0200
commita4535e0aa3e103f87bae6c3f1a1527588e60208c (patch)
tree78f3c80224bd85b41f90d7c3f03ca879981de3d2 /handlers_test.go
parent188d40cc52329e55afbb3a55be2b94057bedb339 (diff)
downloadfinserv-a4535e0aa3e103f87bae6c3f1a1527588e60208c.tar
finserv-a4535e0aa3e103f87bae6c3f1a1527588e60208c.tar.zst
finserv-a4535e0aa3e103f87bae6c3f1a1527588e60208c.zip
Remove registration handler
This should be an admin-only task which should maybe be done via command line on the server.
Diffstat (limited to 'handlers_test.go')
-rw-r--r--handlers_test.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/handlers_test.go b/handlers_test.go
index f24bde4..c3bdabf 100644
--- a/handlers_test.go
+++ b/handlers_test.go
@@ -64,27 +64,6 @@ func TestHTTPVersion(t *testing.T) {
testHandler(t, version, cases, setup)
}
-func TestHTTPRegister(t *testing.T) {
- cases := []httpCase{
- {"basic", "POST", `{"username":"testuser","password":"mypass"}`, "", http.StatusOK},
- {"missing-password", "POST", `{"username":"testuser"}`, "", http.StatusBadRequest},
- {"missing-username", "POST", `{"password":"mypass"}`, "", http.StatusBadRequest},
- {"unknown-field", "POST", `{"username":"testuser","password":"mypass","foo":"bar"}`, "", http.StatusBadRequest},
- {"invalid-json", "POST", `{username":"testuser","password":"mypass"}`, "", http.StatusBadRequest},
- }
-
- setup := func(t *testing.T) *sql.DB {
- db, _ := emptyDB(t)
- err := MigrateToLatest(db)
- if err != nil {
- t.Fatalf("Could not migrate test database: %v", err)
- }
- return db
- }
-
- testHandler(t, ApiRegistration, cases, setup)
-}
-
func TestHTTPAuthenticate(t *testing.T) {
cases := []httpCase{
{"basic", "POST", `{"username":"testuser","password":"mypass"}`, "", http.StatusOK},