Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faulty test assertion for Test 5.2 of Webhooks exercise in the Learn HTTP Servers course #42

Open
amstein4920 opened this issue Dec 3, 2024 · 0 comments

Comments

@amstein4920
Copy link

The last test for Webhooks exercise (Ch 8, Ex 1) in the Learn HTTP Servers course appears to be checking for the is_chirpy_red property at the root level of the JSON response. This would look like this:

{
  "refresh_token": "...",
  "token": "...",
  "user": {...},
  "is_chirpy_red": true
}

versus my failed response (left unaltered):

{
  "refresh_token": "7a079d4b8068cf64be224936c64064b6c964448d42900c4dd7b7743834268cbd",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjaGlycHkiLCJzdWIiOiIzNmIyOTNmMC01ZDI3LTQ5OTgtOWNlZS03ZGRmMjYzZDlmYjgiLCJleHAiOjE3MzMyNTU4MDgsImlhdCI6MTczMzI1MjIwOH0.y2h0YfVJRB5Wxjvuz2bUtApiZWf3u4LHLkcVEa8nvk0",
  "user": {
    "created_at": "2024-12-04T02:56:47.845591Z",
    "email": "walt@breakingbad.com",
    "id": "36b293f0-5d27-4998-9cee-7ddf263d9fb8",
    "is_chirpy_red": true,
    "updated_at": "2024-12-04T02:56:47.845591Z"
  }
}

I don't believe this is intended. "is_chirpy_red" is a property of the User, a column in the Users table. The test should presumably look for user.is_chirpy_red.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant