n-shinde / PeakPeeps

Group Project for CSC 365
0 stars 0 forks source link

Test results LoganSchwarz #7

Open loganjsch opened 8 months ago

loganjsch commented 8 months ago

Flow 1. I can see that the socials/add doesn't exit on your Render docs, so may need to update example flows.

Curl: curl -X 'POST' \ 'https://peak-peeps.onrender.com/users/create_account' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!' \ -H 'Content-Type: application/json' \ -d '{ "username": "calpolySteve" }' Response: "OK"

Curl curl -X 'POST' \ 'https://peak-peeps.onrender.com/users/add_follower' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!' \ -H 'Content-Type: application/json' \ -d '{ "user_to_update": { "username": "calpolySteve" }, "follower_to_add": { "username": "Biker_Dave" } }' Response: Internal Server Error

I might have done something wrong but example flow 1 ends here.

loganjsch commented 8 months ago

Flow 2.

Curl: curl -X 'GET' \ 'https://peak-peeps.onrender.com/routes/popular' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!'

Response: [ "Steve", "Steve", "Lucas Pierce", "Steve" ]

These are bunch of names, should they be trail names?

Curl: curl -X 'POST' \ 'https://peak-peeps.onrender.com/reviews/add' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!' \ -H 'Content-Type: application/json' \ -d '{ "user_id": 1, "route_id": 1, "description": "WoOw So amazing!", "rating": 5 }' Response: Internal Server Error

Flow ends here with error.

loganjsch commented 8 months ago

Flow 3. Curl: curl -X 'POST' \ 'https://peak-peeps.onrender.com/routes/add' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!' \ -H 'Content-Type: application/json' \ -d '{ "name": "Zac'\''s special hike", "user_id": 1, "location": "nowheresbbville", "coordinates": [ 111,020 ], "length": 3, "difficulty": 4, "activities": "rock climbing" }'

Response { "message": [ "['body', 111]: Expecting ',' delimiter: line 6 column 10 (char 111)" ], "data": null } I suppose this is an error on my api parameter calls, but shouldn't coordinates have long and lat?

loganjsch commented 8 months ago

New Flow 1. I am nefarious and want people off my trail. So I make a new account, find the highest rated trail, and all rate the trail poorly. Curl: curl -X 'POST' \ 'https://peak-peeps.onrender.com/users/create_account' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!' \ -H 'Content-Type: application/json' \ -d '{ "username": "evilGuy" }' Response: "OK"

Curl: curl -X 'POST' \ 'https://peak-peeps.onrender.com/reviews/add' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!' \ -H 'Content-Type: application/json' \ -d '{ "user_id": 3, "route_id": 1, "description": "So bad don'\''t come!", "rating": 1 }' Curl: Internal Server Error

New Flow 2. I'm a Cal Poly student and want trail with my mom for mom's weekend. She wants a trail of medium difficulty, so I find that. Curl: Curlcurl -X 'GET' \ 'https://peak-peeps.onrender.com/routes/popular' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!' Response: [ "Steve", "Steve", "Lucas Pierce", "Steve" ]

This doesn't help I don't think, because its people names not trails.

New Flow 3. I know I'm going to Germany in 3 days, and I have a German friend with hikes in Germany on his account. I want to hike right when I land. So I look on the app for trails under his account, but oh no! He doesn't have an account and it should let me know. Curl: curl -X 'GET' \ 'https://peak-peeps.onrender.com/routes/followers?friend_username=heinz_germanman' \ -H 'accept: application/json' \ -H 'access_token: PeepCoins123!'

Response: Internal Server Error