In the before of this test suite, a User is created then a token using User.generateAccessToken. Since this method does not persist accessToken, then truly there are no access token in the database and no authenticated requests can be made.
So far test suite was passing because most tests were either checking non-locked endpoints or hidden endpoints.
In the
before
of this test suite, a User is created then a token usingUser.generateAccessToken
. Since this method does not persist accessToken, then truly there are no access token in the database and no authenticated requests can be made.So far test suite was passing because most tests were either checking non-locked endpoints or hidden endpoints.