| | 227 | |
| | 228 | == Тестирање на `trg_buy_age`, `func_age_gate`, `proc_execute_purchase` |
| | 229 | |
| | 230 | {{{ |
| | 231 | |
| | 232 | -- get the user_id of a user who is under 18 |
| | 233 | SELECT user_id FROM "User" WHERE date_of_birth > '2010-01-01' LIMIT 1; -- 1081 |
| | 234 | |
| | 235 | -- get the event_id of an event whose min_age is 18 |
| | 236 | SELECT event_id FROM "Event" WHERE min_age = 18 LIMIT 1; -- 5 |
| | 237 | |
| | 238 | -- try to make the user under 18 buy a ticket for a happening of the event whose min entrance age is 18 |
| | 239 | CALL proc_execute_purchase(1081, 5, 'QR-FAIL'); |
| | 240 | |
| | 241 | }}} |