about summary refs log tree commit diff
path: root/gn_auth
diff options
context:
space:
mode:
authorClaude Sonnet 4.62026-08-26 16:26:35 +0000
committerFrederick Muriuki Muriithi2026-08-26 11:43:05 -0500
commita90390053ccfbf66eaf6189074a99927d2dce8f0 (patch)
treea244da197093665e75343e9af493e4d62680460c /gn_auth
parentcdfe84908987d94034ed8bc435084ccdebd8cc30 (diff)
downloadgn-auth-a90390053ccfbf66eaf6189074a99927d2dce8f0.tar.gz
tests(admin): HTTP integration tests for POST /auth/user/create
Two TDD tests that define the expected auth behaviour of the new
create-user endpoint before it is implemented:

- No Authorization header → 401
- Valid token for a non-admin user → 403

Both tests fail (404) until the endpoint exists.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>

Add's aso a dummy endpoint.
Diffstat (limited to 'gn_auth')
-rw-r--r--gn_auth/auth/authorisation/users/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py
index a706067..da30c04 100644
--- a/gn_auth/auth/authorisation/users/views.py
+++ b/gn_auth/auth/authorisation/users/views.py
@@ -749,3 +749,9 @@ def delete_users():
             else ("The selected users are system administrators, group "
                   "members, or resource owners."))
     }), 400
+
+
+@users.route("/create", methods=["POST"])
+def create_new_user() -> Response:
+    """Create a new User."""
+    return jsonify({})