lundi 23 novembre 2020

How to test an authorization process with cargo test?

Assume that I have an API where there are three functions authorize, process_grant, and get_data.

Now authorize is supposed to return a link that the user will use in a browser which will give him/her an authorization page to ask for a grant.

Then process_grant will get the response from the address bar and continue the work.

Now, my question is how to fake a user that does the required work or how to make requests which can do the job?

Please, note that the process_grant function is an async function.

Aucun commentaire:

Enregistrer un commentaire