diff options
| author | Claude Sonnet 4.6 | 2026-08-26 16:26:35 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-08-26 11:43:05 -0500 |
| commit | a90390053ccfbf66eaf6189074a99927d2dce8f0 (patch) | |
| tree | a244da197093665e75343e9af493e4d62680460c /gn_auth | |
| parent | cdfe84908987d94034ed8bc435084ccdebd8cc30 (diff) | |
| download | gn-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.py | 6 |
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({}) |
