This commit is contained in:
sophie committed 2026-06-02 13:17:00 +08:00
1 parent 3826c9a503
commit 1b56810cc7
5 files changed
+101 -80

No files matched your search

+6 -3
View File
@@ -52,7 +52,8 @@ def test_admin_duplicate_employee_id(client, admin_headers):
"password": "pwd",
"email": "au1@e.com",
"real_name": "Admin User 1",
"employee_id": "ADM001"
"employee_id": "ADM001",
"phone_number": "13800000011"
}
response = client.post('/api/admin/users', json=u1, headers=admin_headers)
assert response.status_code == 201
@@ -63,7 +64,8 @@ def test_admin_duplicate_employee_id(client, admin_headers):
"password": "pwd",
"email": "au2@e.com",
"real_name": "Admin User 2",
"employee_id": "ADM001"
"employee_id": "ADM001",
"phone_number": "13800000012"
}
response = client.post('/api/admin/users', json=u2, headers=admin_headers)
assert response.status_code == 400
@@ -76,7 +78,8 @@ def test_admin_duplicate_employee_id(client, admin_headers):
"password": "pwd",
"email": "au3@e.com",
"real_name": "Admin User 3",
"employee_id": "ADM003"
"employee_id": "ADM003",
"phone_number": "13800000013"
}
res = client.post('/api/admin/users', json=u3, headers=admin_headers)
u3_id = res.json['id']