Merge branch '890-assign-admin' into 'develop'
See #890: assign report to moderator on resolution See merge request funkwhale/funkwhale!881
This commit is contained in:
commit
def555bd50
2 changed files with 22 additions and 0 deletions
|
|
@ -499,3 +499,17 @@ def test_report_update(factories, superuser_api_client):
|
|||
assert response.status_code == 200
|
||||
report.refresh_from_db()
|
||||
assert report.is_handled is True
|
||||
|
||||
|
||||
def test_report_update_is_handled_true_assigns(factories, superuser_api_client):
|
||||
actor = superuser_api_client.user.create_actor()
|
||||
report = factories["moderation.Report"]()
|
||||
url = reverse(
|
||||
"api:v1:manage:moderation:reports-detail", kwargs={"uuid": report.uuid}
|
||||
)
|
||||
response = superuser_api_client.patch(url, {"is_handled": True})
|
||||
|
||||
assert response.status_code == 200
|
||||
report.refresh_from_db()
|
||||
assert report.is_handled is True
|
||||
assert report.assigned_to == actor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue