mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 21:15:22 +02:00
refactor(backend): 🔥 Remove Backend Theme Support
This commit is contained in:
parent
dd1b1ad067
commit
161618808e
15 changed files with 11 additions and 252 deletions
|
@ -24,7 +24,7 @@ def admin_user():
|
|||
@fixture(scope="session")
|
||||
def new_user():
|
||||
return UserOut(
|
||||
id=4,
|
||||
id=3,
|
||||
fullName="My New User",
|
||||
username="My New User",
|
||||
email="newuser@email.com",
|
||||
|
@ -117,14 +117,14 @@ def test_update_other_user_as_not_admin(api_client: TestClient, api_routes: AppR
|
|||
|
||||
|
||||
def test_update_self_as_not_admin(api_client: TestClient, api_routes: AppRoutes, user_token):
|
||||
update_data = {"id": 3, "fullName": "User fullname", "email": "user@email.com", "group": "Home", "admin": False}
|
||||
response = api_client.put(api_routes.users_id(3), headers=user_token, json=update_data)
|
||||
update_data = {"fullName": "User fullname", "email": "user@email.com", "group": "Home", "admin": False}
|
||||
response = api_client.put(api_routes.users_id(4), headers=user_token, json=update_data)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_self_demote_admin(api_client: TestClient, api_routes: AppRoutes, admin_token):
|
||||
update_data = {"id": 1, "fullName": "Updated Name", "email": "changeme@email.com", "group": "Home", "admin": False}
|
||||
update_data = {"fullName": "Updated Name", "email": "changeme@email.com", "group": "Home", "admin": False}
|
||||
response = api_client.put(api_routes.users_id(1), headers=admin_token, json=update_data)
|
||||
|
||||
assert response.status_code == 403
|
||||
|
@ -132,13 +132,13 @@ def test_self_demote_admin(api_client: TestClient, api_routes: AppRoutes, admin_
|
|||
|
||||
def test_self_promote_admin(api_client: TestClient, api_routes: AppRoutes, user_token):
|
||||
update_data = {"id": 3, "fullName": "Updated Name", "email": "user@email.com", "group": "Home", "admin": True}
|
||||
response = api_client.put(api_routes.users_id(3), headers=user_token, json=update_data)
|
||||
response = api_client.put(api_routes.users_id(2), headers=user_token, json=update_data)
|
||||
|
||||
assert response.status_code == 403
|
||||
|
||||
|
||||
def test_reset_user_password(api_client: TestClient, api_routes: AppRoutes, admin_token):
|
||||
response = api_client.put(api_routes.users_id_reset_password(4), headers=admin_token)
|
||||
response = api_client.put(api_routes.users_id_reset_password(3), headers=admin_token)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue