NLTN / StudentEnrollment

A back-end Web Service to manage course enrollment and waiting lists with functionality similar to TitanOnline.
GNU General Public License v3.0
0 stars 4 forks source link

Unittest #64

Closed NLTN closed 9 months ago

NLTN commented 9 months ago

What?

Added unittest for endpoint /api/subsribe

Test Cases:

  1. test_subscribe_email_only
  2. test_subscribe_webhook_only
  3. test_subscribe_email_and_webhook
  4. test_subscribe_wrong_class
  5. test_missing_email_and_webhook
  6. test_email_already_subscribed
  7. test_webhook_already_subscribed
  8. test_both_email_and_webhook_already_subscribed

Body JSON will be posted:

RequestBody = { "class_id": str "email": str | Optional, "webhook_url": str | Optional, }

Expected Responses: