In https://pagure.io/pagure/pull-request/1725 @cep improved the documentation and behavior when someone tries to create a new API token for a project.
We should make sure this is cover in the unit-tests.
This seems to be covered already at https://pagure.io/pagure/blob/master/f/tests/test_pagure_flask_ui_repo.py#_3090
Am I right?
Yup, we just need to make sure the error message is actually returned to the user :)
The already-existing tests (mentioned in my previous comment) pass:
Test the add_token endpoint. ... ok
The user is shown an error message using flash. Ref: https://pagure.io/pagure/blob/master/f/pagure/ui/repo.py#_1815
flash
@pingou Is this behaviour sufficient, or do we need to add something more?
Yes, and the test doesn't check if the message was actually shown or not
Fixed by @cep in https://pagure.io/pagure/pull-request/1750
@pingou changed the status to Closed
Closed