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

Added tests for api enpoints #631

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

bzzz-coding
Copy link
Member

@bzzz-coding bzzz-coding commented Jan 17, 2025

Fixes #630

Changes

Endpoints Tested:

  • /api/healthcheck/: Tests the healthcheck endpoint to ensure it returns a successful response.

  • /api/communityOfPractice/: Tests the ability to list all Communities of Practice.

  • /api/roles/: Tests the ability to list all Roles.

  • /api/skills/: Tests the ability to list all Skills.

  • /api/projects/: Tests the ability to list all Projects.

  • /api/opportunities/:
    Tests listing all opportunities as an unauthenticated user.
    Tests that a regular user cannot create an opportunity.

  • /api/users/<id>/:
    Tests that a user can access their own details.
    Tests that a user can't access another user's details.
    Tests that unauthenticated users can't access user details.

@bzzz-coding bzzz-coding marked this pull request as ready for review January 23, 2025 19:24
@LoTerence
Copy link
Member

comment out test_user_can_access_own_details for now

PR fixes the test_create_opportunity_as_regular_user

change the last one to 403

@bzzz-coding bzzz-coding requested a review from LoTerence January 31, 2025 18:58
Copy link
Member

@LoTerence LoTerence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, looks great!

@bzzz-coding bzzz-coding merged commit b1df7ae into hackforla:develop Feb 6, 2025
@bzzz-coding bzzz-coding deleted the 630-api-endpoint-tests branch February 6, 2025 05:31
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

Successfully merging this pull request may close these issues.

2 participants