Skip to content

Add integration test for the admin invoice reject endpoint storing the rejection reason and notifying the seller #206

Description

@Chucks1093

Summary

When an admin rejects an invoice, the rejection reason should be stored on the invoice record and a notification should be created for the seller. An integration test should confirm both side effects occur and that the invoice status transitions to rejected.

Scope

  • Seed a pending_review invoice owned by seller A
  • Call the admin reject endpoint with a rejection reason string
  • Assert the invoice status is rejected
  • Assert the rejection_reason field on the invoice record matches the submitted reason
  • Assert a notification exists for seller A's wallet with the rejection reason in the message

Acceptance Criteria

  • Invoice status transitions to rejected
  • rejection_reason persisted on the invoice record
  • Notification created for the seller wallet
  • Non-admin caller receives 403
  • Rejecting an already-rejected invoice returns 409

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions