fix: send out a FlagNotification when a package is flagged

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-02-05 04:40:25 -08:00
parent 2d6c09bec5
commit e777b7052e
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
2 changed files with 5 additions and 0 deletions

View file

@ -836,6 +836,9 @@ def test_pkgbase_flag(client: TestClient, user: User, maintainer: User,
assert pkgbase.Flagger == user
assert pkgbase.FlaggerComment == "Test"
# Should've gotten a FlagNotification.
assert Email.count() == 1
# Now, let's check the /pkgbase/{name}/flag-comment route.
flag_comment_endpoint = f"/pkgbase/{pkgbase.Name}/flag-comment"
with client as request: