Skip to main content
GET
/
api
/
test
/
full-test
curl -X GET https://api-verifier-2.onrender.com/api/test/full-test
{
  "message": "Full model test successful",
  "created": {
    "user": "507f1f77bcf86cd799439011",
    "category": "507f1f77bcf86cd799439012",
    "product": "507f1f77bcf86cd799439013",
    "promotion": "507f1f77bcf86cd799439014",
    "file": "507f1f77bcf86cd799439015",
    "blog": "507f1f77bcf86cd799439016",
    "editHistory": "507f1f77bcf86cd799439017",
    "cart": "507f1f77bcf86cd799439018",
    "order": "507f1f77bcf86cd799439019",
    "orderItem": "507f1f77bcf86cd79943901a",
    "transaction": "507f1f77bcf86cd79943901b",
    "subscription": "507f1f77bcf86cd79943901c",
    "review": "507f1f77bcf86cd79943901d",
    "notification": "507f1f77bcf86cd79943901e",
    "supportTicket": "507f1f77bcf86cd79943901f"
  }
}
This endpoint is for testing purposes only. It creates dummy data across all models using a database transaction.

Overview

This endpoint tests all Shop models by creating interconnected dummy data within a single MongoDB transaction. If any creation fails, the entire transaction is rolled back.

Models tested

The endpoint creates test records for the following models:
  • User - Test user account
  • Category - Product category
  • Product - Shop product
  • Promotion - Product promotion/discount
  • File - Product file attachment
  • BlogPost - Blog post content
  • EditHistory - Blog edit tracking
  • Cart - Shopping cart
  • Order - Customer order
  • OrderItem - Order line items
  • Transaction - Payment transaction
  • Subscription - User subscription
  • Review - Product review
  • Notification - User notification
  • SupportTicket - Customer support ticket

Response

message
string
Success message confirming test completion
created
object
Object containing IDs of all created records
curl -X GET https://api-verifier-2.onrender.com/api/test/full-test
{
  "message": "Full model test successful",
  "created": {
    "user": "507f1f77bcf86cd799439011",
    "category": "507f1f77bcf86cd799439012",
    "product": "507f1f77bcf86cd799439013",
    "promotion": "507f1f77bcf86cd799439014",
    "file": "507f1f77bcf86cd799439015",
    "blog": "507f1f77bcf86cd799439016",
    "editHistory": "507f1f77bcf86cd799439017",
    "cart": "507f1f77bcf86cd799439018",
    "order": "507f1f77bcf86cd799439019",
    "orderItem": "507f1f77bcf86cd79943901a",
    "transaction": "507f1f77bcf86cd79943901b",
    "subscription": "507f1f77bcf86cd79943901c",
    "review": "507f1f77bcf86cd79943901d",
    "notification": "507f1f77bcf86cd79943901e",
    "supportTicket": "507f1f77bcf86cd79943901f"
  }
}