|
| 1 | +-- 5 test users are added |
| 2 | +-- user-with-a-profile@dancier.net |
| 3 | +-- -> the user that initiates the query |
| 4 | +-- user-matching-criterias@dancier.net |
| 5 | +-- -> a user that matches all query parameters and is returned by GET /dancers request |
| 6 | +-- user-without-matching-gender@dancier.net |
| 7 | +-- -> a user that matches all query parameters except gender and is returned by GET /dancers request |
| 8 | +-- user-without-matching-latitude@dancier.net |
| 9 | +-- -> valid user with a profile but not matching the latitude |
| 10 | +-- user-without-matching-longitude@dancier.net |
| 11 | +-- -> valid user with a profile but not matching the longitude |
| 12 | + |
| 13 | +-- user who initiates the query |
| 14 | +INSERT |
| 15 | + INTO users (id, email, password, email_validated ) |
| 16 | + VALUES ( |
| 17 | + '55bbf334-6649-11ed-8f65-5b299f0e161f', |
| 18 | + 'user-with-a-profile@dancier.net', |
| 19 | + '$2a$10$GOChyBEqco9m3wZwkh0RqOTwyWq4HmocguPPfEraSgnbmlrM4.Fey', |
| 20 | + true |
| 21 | + ); |
| 22 | + |
| 23 | +INSERT |
| 24 | + INTO user_roles (user_id, role_id) |
| 25 | +SELECT '55bbf334-6649-11ed-8f65-5b299f0e161f', |
| 26 | + id |
| 27 | + FROM roles |
| 28 | + WHERE name IN ('ROLE_USER', 'ROLE_HUMAN'); |
| 29 | + |
| 30 | +INSERT |
| 31 | + INTO dancer(user_id, id, dancer_name, size, birth_date, gender, country, city, longitude, latitude, about_me) |
| 32 | +VALUES ('55bbf334-6649-11ed-8f65-5b299f0e161f', '11065e54-664a-11ed-872e-1b1eb88b44b6', 'good_dancer', '178', '2000-11-11', 'MALE', 'GER', 'Dortmund', '7.1075023', '51.4429498', 'Hi'); |
| 33 | + |
| 34 | +-- one ordinary user with matching profile |
| 35 | +INSERT |
| 36 | + INTO users (id, email, password, email_validated ) |
| 37 | + VALUES ( |
| 38 | + 'b8300af3-a27b-41ed-b35b-3735b25a04df', |
| 39 | + 'user-matching-criterias@dancier.net', |
| 40 | + '$2a$10$GOChyh6tco9m3wZwkh0RqOTwyWq4HmocguPPfEraSgnbmlrM4.Fax', |
| 41 | + true |
| 42 | + ); |
| 43 | + |
| 44 | +INSERT |
| 45 | + INTO user_roles (user_id, role_id) |
| 46 | +SELECT 'b8300af3-a27b-41ed-b35b-3735b25a04df', |
| 47 | + id |
| 48 | + FROM roles |
| 49 | + WHERE name IN ('ROLE_USER', 'ROLE_HUMAN'); |
| 50 | + |
| 51 | +INSERT |
| 52 | + INTO dancer(user_id, id, dancer_name, size, birth_date, gender, country, city, longitude, latitude, about_me) |
| 53 | +VALUES ('b8300af3-a27b-41ed-b35b-3735b25a04df', '503ffad4-148b-4af1-8365-62315ff89b9f', 'perfect_dancer', '178', '1998-11-11', 'FEMALE', 'GER', 'Dortmund', '7.0075023', '51.3429498', 'Hi'); |
| 54 | + |
| 55 | +-- one ordinary user with not matching gender |
| 56 | +INSERT |
| 57 | + INTO users (id, email, password, email_validated ) |
| 58 | + VALUES ( |
| 59 | + 'b90e6478-19d9-492e-97a8-df1f8f7c3901', |
| 60 | + 'user-without-matching-gender@dancier.net', |
| 61 | + '$2a$10$GOChyh6tco9zu6Zwkh0RqOTwyWq4HmocguPPfEraSgnbmlrM4.Fax', |
| 62 | + true |
| 63 | + ); |
| 64 | + |
| 65 | +INSERT |
| 66 | + INTO user_roles (user_id, role_id) |
| 67 | +SELECT 'b90e6478-19d9-492e-97a8-df1f8f7c3901', |
| 68 | + id |
| 69 | + FROM roles |
| 70 | + WHERE name IN ('ROLE_USER', 'ROLE_HUMAN'); |
| 71 | + |
| 72 | +INSERT |
| 73 | + INTO dancer(user_id, id, dancer_name, size, birth_date, gender, country, city, longitude, latitude, about_me) |
| 74 | +VALUES ('b90e6478-19d9-492e-97a8-df1f8f7c3901', '0948c9ba-75a9-4821-8701-0cd3e564f10e', 'Horst', '178', '1980-11-11', 'MALE', 'GER', 'Dortmund', '7.0075023', '51.3429498', 'Hi'); |
| 75 | + |
| 76 | +-- one ordinary user with not matching latitude |
| 77 | +INSERT |
| 78 | + INTO users (id, email, password, email_validated ) |
| 79 | + VALUES ( |
| 80 | + '6cd96820-ce61-4f72-9fa4-6f8900bb7494', |
| 81 | + 'user-without-matching-latitude@dancier.net', |
| 82 | + '$2a$10$GOChyh6tco9m3wZwkk8tqOTwyWq4HmocguPPfEraSgnbmlrM4.Fax', |
| 83 | + true |
| 84 | + ); |
| 85 | + |
| 86 | +INSERT |
| 87 | + INTO user_roles (user_id, role_id) |
| 88 | +SELECT '6cd96820-ce61-4f72-9fa4-6f8900bb7494', |
| 89 | + id |
| 90 | + FROM roles |
| 91 | + WHERE name IN ('ROLE_USER', 'ROLE_HUMAN'); |
| 92 | + |
| 93 | +INSERT |
| 94 | + INTO dancer(user_id, id, dancer_name, size, birth_date, gender, country, city, longitude, latitude, about_me) |
| 95 | +VALUES ('6cd96820-ce61-4f72-9fa4-6f8900bb7494', '9593cd4c-bff4-41b5-b7d8-a632a526721a', 'dancer', '178', '1997-11-11', 'FEMALE', 'GER', 'Bremen', '7.0075023', '54.3429498', 'Hi'); |
| 96 | + |
| 97 | +-- one ordinary user with not matching longitude |
| 98 | +INSERT |
| 99 | + INTO users (id, email, password, email_validated ) |
| 100 | + VALUES ( |
| 101 | + 'e177c7f1-1082-4bd1-ad72-fd88de5b19b2', |
| 102 | + 'user-without-matching-longitude@dancier.net', |
| 103 | + '$2a$10$GOChyh6tco9m3wZwkk8tqOTwyWq4HmocguPPfEraSgnbmlrM4.Fax', |
| 104 | + true |
| 105 | + ); |
| 106 | + |
| 107 | +INSERT |
| 108 | + INTO user_roles (user_id, role_id) |
| 109 | +SELECT 'e177c7f1-1082-4bd1-ad72-fd88de5b19b2', |
| 110 | + id |
| 111 | + FROM roles |
| 112 | + WHERE name IN ('ROLE_USER', 'ROLE_HUMAN'); |
| 113 | + |
| 114 | +INSERT |
| 115 | + INTO dancer(user_id, id, dancer_name, size, birth_date, gender, country, city, longitude, latitude, about_me) |
| 116 | +VALUES ('e177c7f1-1082-4bd1-ad72-fd88de5b19b2', 'f140bc96-5d65-4e6b-8727-f89f2afef03d', 'dancing_queen', '178', '1995-11-11', 'FEMALE', 'GER', 'Essen', '6.0075023', '51.3429498', 'Hi'); |
0 commit comments