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

Create PUT /api/outfits/:id unit test #74

Open
1 task
rak3rman opened this issue Feb 24, 2024 · 0 comments
Open
1 task

Create PUT /api/outfits/:id unit test #74

rak3rman opened this issue Feb 24, 2024 · 0 comments
Labels
backend Related to the hono backend test Related to testing; no production code change

Comments

@rak3rman
Copy link
Member

rak3rman commented Feb 24, 2024

Description

Create a full-fledged unit test for the PUT /api/outfits/:id route. This unit test should follow best practice standards for what a unit test is: ensure that all functions called by route are mocked (use the factory objects to your advantage here). This test may end up being quite simple considering that the route is just a wrapper for a drizzle query. Research best standards for writing unit tests. Make sure to test for ALL edge cases.

Acceptance Criteria

Generated by Zenhub AI

  • Scenario: Testing PUT /api/outfits/:id route
  • Given there is a valid outfit ID
  • When the PUT request is made to update the outfit with valid data
  • Then the response should be a successful update with the updated outfit information
  • Given there is a valid outfit ID
  • When the PUT request is made to update the outfit with invalid data
  • Then the response should be an error message indicating the invalid data
  • Given there is a non-existent outfit ID
  • When the PUT request is made to update the outfit
  • Then the response should be a 404 error message indicating the outfit does not exist
@rak3rman rak3rman added test Related to testing; no production code change backend Related to the hono backend labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to the hono backend test Related to testing; no production code change
Projects
None yet
Development

No branches or pull requests

1 participant