Changes between Version 5 and Version 6 of DatabaseProgramming


Ignore:
Timestamp:
04/30/26 14:32:08 (2 days ago)
Author:
231027
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DatabaseProgramming

    v5 v6  
    201201
    202202}}}
     203
     204== Тестирање на `proc_execute_purchase`, `fn_calculate_price`, `proc_execute_refund`, `trg_buy_age`, `trg_ticket_gate`
     205
     206{{{
     207
     208-- 1. make purchase
     209CALL proc_execute_purchase(1, 100, 'QR-TEST-CODE-001');
     210
     211-- 2. check if ticket is not available (is_available should be false)
     212SELECT is_available FROM "Ticket" WHERE ticket_id = 100;
     213
     214-- 3. check if price is calculated correctly in Ticket_Purchase
     215SELECT * FROM "Ticket_Purchase" WHERE ticket_id = 100;
     216
     217-- 4. make refund to the purchase (purchase_id from before)
     218CALL proc_execute_refund(16000001);
     219
     220-- 5. check if the ticket is available (is_available should be true)
     221SELECT is_available FROM "Ticket" WHERE ticket_id = 100;
     222
     223-- 6. check if there is a corresponding record in Ticket_Refund
     224SELECT * FROM "Ticket_Refund" WHERE purchase_id = 16000001;
     225
     226}}}