balderdashy / balderdashy/sails
[Help]Testing with Authenticated User
- Dominant language
- JavaScript
- Stars
- 22.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
I'm on a very basic Sails Web App.
I need to implement Testing, but i've not found anything on authenticated user.
I followed the basic [sails testing](https://sailsjs.com/documentation/concepts/testing).
Does anyone have an idea how to do it ?
I've tried the method detailed in this [article](https://medium.com/@juha.a.hytonen/testing-authenticated-requests-with-supertest-325ccf47c2bb).
But it still gives me two errors, one on login, and gives me 200 instead of 302 ( i'm testing the basic provided welcome page in the view-homepage-or-redirect action)
Contributor guide
Research direction
Start with the linked Sails testing documentation and reproduce the authenticated request around the login flow and the view-homepage-or-redirect action. Review the two reported errors and the unexpected 200-versus-302 response; the work is done when the authentication test behavior and the expected response are clearly explained or corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- authentication, backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100