wiki:Testing and Validation

Version 1 (modified by 193284, 2 weeks ago) ( diff )

--

Testing and Validation

Description

This section contains SQL scenarios used for testing trigger behavior and advanced database validation.

1. Venue Booking Conflict Test

INSERT INTO venue_booking(
    "date",
    start_time,
    end_time,
    status,
    price,
    venue_id,
    wedding_id
)
VALUES (
    '2026-06-20',
    '18:00',
    '22:00',
    'confirmed',
    5000,
    1,
    1
);

Expected Result: The trigger prevents overlapping bookings.

2. RSVP Validation Test

INSERT INTO attendance(
    status,
    table_number,
    role,
    guest_id,
    event_id
)
VALUES (
    'attending',
    3,
    'Guest',
    1,
    1
);

Expected Result: Guests who declined RSVP cannot be marked as attending.

Note: See TracWiki for help on using the wiki.