issue Change copy of notifications to contributor #154

This commit is contained in:
Kostiantyn Stoliarskyi 2023-06-16 10:47:30 +03:00
parent 7f7066e2ff
commit 94fea4c81a
2 changed files with 3 additions and 3 deletions

View File

@ -267,14 +267,14 @@ def contributor_notification(
book: m.Book = db.session.get(m.Book, entity_id) book: m.Book = db.session.get(m.Book, entity_id)
match action: match action:
case m.Notification.Actions.CONTRIBUTING: case m.Notification.Actions.CONTRIBUTING:
text = f"You've been added to {book.label} as an Editor/Moderator" text = f"You've been added to {book.label} as an Contributor"
link = url_for( link = url_for(
"book.collection_view", "book.collection_view",
book_id=book.id, book_id=book.id,
) )
case m.Notification.Actions.DELETE: case m.Notification.Actions.DELETE:
text = f"You've been removed from {book.label} as an Editor/Moderator" text = f"You've been removed from {book.label} as an Contributor"
link = url_for( link = url_for(
"book.collection_view", "book.collection_view",
book_id=book.id, book_id=book.id,

View File

@ -57,7 +57,7 @@ def test_notifications(client: FlaskClient):
) )
assert response.status_code == 200 assert response.status_code == 200
# check that user_2 have notification about he was added, deleted as Editor/Moderator and his comment was approved # check that user_2 have notification about he was added, deleted as Contributor and his comment was approved
assert len(user_2.active_notifications) == 3 assert len(user_2.active_notifications) == 3
response: Response = client.post( response: Response = client.post(