Skip to content

Conversation

@amywng
Copy link
Member

@amywng amywng commented Feb 9, 2026

ℹ️ Issue

Closes SSF-137

📝 Description

  • Added controller and service tests for orders module
  • Removed pantry check for findOrderPantry because FK constraint guarantees valid pantry reference.

✔️ Verification

Ran yarn test with all tests passing.

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

expect(result.orderId).toBe(1);
});

it('throws BadRequestException for non positive ID', async () => {
Copy link

@dburkhart07 dburkhart07 Feb 10, 2026

Choose a reason for hiding this comment

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

Tests like these are something I think we should determine if we want to do now, before we start doing the rest of our testing. @sam-schu this test is honestly just making sure the validate call works. Is it really worth testing this helper function that is called in almost all of our service functions, or can we test it separately and not have to do this every single time for every single test? I'm more in favor of the second option.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah we actually already test them in validation.utils.spec.ts so imma delete

@amywng amywng force-pushed the acw/SSF-137-orders-tests branch from 8629389 to 1a806ca Compare February 10, 2026 20:46
@amywng amywng requested a review from dburkhart07 February 10, 2026 20:51
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

Some initial comments!

@amywng amywng requested a review from dburkhart07 February 12, 2026 11:44
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

Few more small things.

@amywng amywng requested a review from dburkhart07 February 13, 2026 04:58
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

LGTM!!!! 🐼 🥞 🍳 🥖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants