Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.26 KB

Functionnal_Test.md

File metadata and controls

34 lines (26 loc) · 1.26 KB

Functionnal test Documentation


Here is a short introduction if you want to know how to test the program. As its a Rest-Api Oauth2 application, we can't really test it out automatically


Authentification


First you should build TokenAsk Widget, it will require you to log into reddit
after that try declining when it asks you for permissions
if it successed the application must send you back to the page that asks for permissions
After that you may try accepting the request, it must redirect you to the home pageafter a few moment

Getting informations


Now that you have a Token, you can try pulling data
First create a subReddit object with the name of a subReddit you know
Then use the getInfo() function and print the result
The result must be the same as in the subReddit on the website

Pulling a subReddit


Use the previously subReddit object created. Then call either getTop(), getHot() or getNew() depending on what you want to test
Afterward the posts member of your subReddit variable has been fullfilled
Iterate through the list of posts, it must have posts inside BUT not in the same order than in reddit