From caea6566204eb7cc2237674773e8c53b9f1a4188 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Wed, 11 Dec 2024 16:37:03 +0100 Subject: [PATCH] start fixing tests --- seeds.sql | 64 +++++++++++++++++++++------- seeds_demo.sql | 104 ---------------------------------------------- seeds_initial.sql | 22 ++++++++++ src/model/user.rs | 15 +------ 4 files changed, 74 insertions(+), 131 deletions(-) delete mode 100644 seeds_demo.sql create mode 100644 seeds_initial.sql diff --git a/seeds.sql b/seeds.sql index 1714844..2641243 100644 --- a/seeds.sql +++ b/seeds.sql @@ -1,22 +1,58 @@ INSERT INTO "role" (name) VALUES ('admin'); INSERT INTO "role" (name) VALUES ('cox'); INSERT INTO "role" (name) VALUES ('scheckbuch'); +INSERT INTO "role" (name) VALUES ('tech'); +INSERT INTO "role" (name) VALUES ('Donau Linz'); INSERT INTO "role" (name) VALUES ('manage_events'); - -INSERT INTO "user" (name) VALUES('admin'); +INSERT INTO "role" (name) VALUES ('Rennrudern'); +INSERT INTO "role" (name) VALUES ('paid'); +INSERT INTO "role" (name) VALUES ('Vorstand'); +INSERT INTO "role" (name) VALUES ('Bootsführer'); +INSERT INTO "role" (name) VALUES ('schnupperant'); +INSERT INTO "role" (name) VALUES ('kassier'); +INSERT INTO "role" (name) VALUES ('schriftfuehrer'); +INSERT INTO "role" (name) VALUES ('no-einschreibgebuehr'); +INSERT INTO "role" (name) VALUES ('schnupper-betreuer'); +INSERT INTO "role" (name) VALUES ('allow_website_login'); +INSERT INTO "user" (name, pw) VALUES('admin', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM'); INSERT INTO "user_role" (user_id, role_id) VALUES(1,1); INSERT INTO "user_role" (user_id, role_id) VALUES(1,2); -INSERT INTO "user_role" (user_id, role_id) VALUES(1,4); -INSERT INTO "user" (name) VALUES('steuerperson'); -INSERT INTO "user_role" (user_id, role_id) VALUES(2,2); -INSERT INTO "user" (name) VALUES('anfaenger'); +INSERT INTO "user_role" (user_id, role_id) VALUES(1,5); +INSERT INTO "user_role" (user_id, role_id) VALUES(1,6); +INSERT INTO "user" (name, pw) VALUES('rower', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$jWKzDmI0jqT2dqINFt6/1NjVF4Dx15n07PL1ZMBmFsY'); +INSERT INTO "user_role" (user_id, role_id) VALUES(2,5); +INSERT INTO "user" (name, pw) VALUES('guest', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$GF6gizbI79Bh0zA9its8S0gram956v+YIV8w8VpwJnQ'); +INSERT INTO "user_role" (user_id, role_id) VALUES(3,5); INSERT INTO "user_role" (user_id, role_id) VALUES(3,3); +INSERT INTO "user" (name, pw) VALUES('cox', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$lnWzHx3DdqS9GQyWYel82kIotZuK2wk9EyfhPFtjNzs'); +INSERT INTO "user_role" (user_id, role_id) VALUES(4,5); +INSERT INTO "user_role" (user_id, role_id) VALUES(4,2); +INSERT INTO "user_role" (user_id, role_id) VALUES(4,8); +INSERT INTO "user" (name) VALUES('new'); +INSERT INTO "user_role" (user_id, role_id) VALUES(5,5); +INSERT INTO "user" (name, pw) VALUES('cox2', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$lnWzHx3DdqS9GQyWYel82kIotZuK2wk9EyfhPFtjNzs'); +INSERT INTO "user_role" (user_id, role_id) VALUES(6,5); +INSERT INTO "user_role" (user_id, role_id) VALUES(6,2); +INSERT INTO "user" (name, pw) VALUES('rower2', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$jWKzDmI0jqT2dqINFt6/1NjVF4Dx15n07PL1ZMBmFsY'); +INSERT INTO "user_role" (user_id, role_id) VALUES(7,5); +INSERT INTO "user" (name, pw) VALUES('teen', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$jWKzDmI0jqT2dqINFt6/1NjVF4Dx15n07PL1ZMBmFsY'); +INSERT INTO "user_role" (user_id, role_id) VALUES(8,5); +INSERT INTO "user_role" (user_id, role_id) VALUES(8,7); +INSERT INTO "user" (name, pw) VALUES('Vorstandsmitglied', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$jWKzDmI0jqT2dqINFt6/1NjVF4Dx15n07PL1ZMBmFsY'); +INSERT INTO "user_role" (user_id, role_id) VALUES(9,5); +INSERT INTO "user" (name, pw) VALUES('main', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM'); +INSERT INTO "user_role" (user_id, role_id) VALUES(10,1); +INSERT INTO "user_role" (user_id, role_id) VALUES(10,2); +INSERT INTO "user_role" (user_id, role_id) VALUES(10,5); +INSERT INTO "user_role" (user_id, role_id) VALUES(10,6); +INSERT INTO "user_role" (user_id, role_id) VALUES(10,9); -INSERT INTO trip_type VALUES(1,'Regatta','Regatta!','Kein normales Event. Das ist eine Regatta! Willst du wirklich teilnehmen?','🏅'); -INSERT INTO trip_type VALUES(2,'Lange Ausfahrt','Lange Ausfahrt!','Das ist eine lange Ausfahrt! Willst du wirklich teilnehmen?','💪'); -INSERT INTO trip_type VALUES(3,'Wanderfahrt','Wanderfahrt!','Kein normales Event. Das ist eine Wanderfahrt! Bitte überprüfe ob du alle Anforderungen erfüllst. Willst du wirklich teilnehmen?','⛱'); -INSERT INTO trip_type VALUES(4,'Ergo','Ergo-Fahrt im Bootshaus','Das ist keine Fahrt auf der Donau, sondern eine tolle Ergo-Einheit im Bootshaus. Willst du teilnehmen?','🏠'); -INSERT INTO trip_type VALUES(5,'Ruderbecken','Ruderbecken-Training','Das ist ein Training im Ruderbecken. Willst du teilnehmen?','🏠'); -INSERT INTO trip_type VALUES(6,'Theorie','Theorie','Das ist keine Ausfahrt. Stattdessen wirst du mit zusätzlichem Wissen belohnt. Willst du teilnehmen?','📚'); -INSERT INTO trip_type VALUES(7,'Arbeitspartie','Arbeitspartie','Keine Ausfahrt, sondern eine Arbeitspartie im Bootshaus. Willst du teilnehmen?','🧹'); -INSERT INTO trip_type VALUES(8,'Einer-Ausfahrt','1x Ausfahrt','Das ist eine Ausfahrt in Einer-Booten (1x). Willst du teilnehmen?','1️⃣'); +INSERT INTO "trip_details" (planned_starting_time, max_people, day, notes) VALUES('10:00', 2, date('now'), 'trip_details for a planned event'); +INSERT INTO "planned_event" (name, planned_amount_cox, trip_details_id) VALUES('test-planned-event', 2, 1); + +INSERT INTO "trip_details" (planned_starting_time, max_people, day, notes) VALUES('11:00', 1, date('now', '+1 day'), 'trip_details for trip from cox'); +INSERT INTO "trip" (cox_id, trip_details_id) VALUES(4, 2); + +INSERT INTO "trip_type" (name, desc, question, icon) VALUES ('Regatta', 'Regatta!', 'Kein normales Event. Das ist eine Regatta! Willst du wirklich teilnehmen?', '🏅'); +INSERT INTO "trip_type" (name, desc, question, icon) VALUES ('Lange Ausfahrt', 'Lange Ausfahrt!', 'Das ist eine lange Ausfahrt! Willst du wirklich teilnehmen?', '💪'); +INSERT INTO "trip_type" (name, desc, question, icon) VALUES ('Wanderfahrt', 'Wanderfahrt!', 'Kein normales Event. Das ist eine Wanderfahrt! Bitte überprüfe ob du alle Anforderungen erfüllst. Willst du wirklich teilnehmen?', '⛱'); diff --git a/seeds_demo.sql b/seeds_demo.sql deleted file mode 100644 index e6d7734..0000000 --- a/seeds_demo.sql +++ /dev/null @@ -1,104 +0,0 @@ -INSERT INTO "role" (name) VALUES ('admin'); -INSERT INTO "role" (name) VALUES ('cox'); -INSERT INTO "role" (name) VALUES ('scheckbuch'); -INSERT INTO "role" (name) VALUES ('tech'); -INSERT INTO "role" (name) VALUES ('Donau Linz'); -INSERT INTO "role" (name) VALUES ('manage_events'); -INSERT INTO "role" (name) VALUES ('Rennrudern'); -INSERT INTO "role" (name) VALUES ('paid'); -INSERT INTO "role" (name) VALUES ('Vorstand'); -INSERT INTO "role" (name) VALUES ('Bootsführer'); -INSERT INTO "role" (name) VALUES ('schnupperant'); -INSERT INTO "role" (name) VALUES ('kassier'); -INSERT INTO "role" (name) VALUES ('schriftfuehrer'); -INSERT INTO "role" (name) VALUES ('no-einschreibgebuehr'); -INSERT INTO "role" (name) VALUES ('schnupper-betreuer'); -INSERT INTO "role" (name) VALUES ('allow_website_login'); -INSERT INTO "user" (name, pw) VALUES('admin', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM'); -INSERT INTO "user_role" (user_id, role_id) VALUES(1,1); -INSERT INTO "user_role" (user_id, role_id) VALUES(1,2); -INSERT INTO "user_role" (user_id, role_id) VALUES(1,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(1,6); -INSERT INTO "user" (name, pw) VALUES('rower', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$jWKzDmI0jqT2dqINFt6/1NjVF4Dx15n07PL1ZMBmFsY'); -INSERT INTO "user_role" (user_id, role_id) VALUES(2,5); -INSERT INTO "user" (name, pw) VALUES('guest', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$GF6gizbI79Bh0zA9its8S0gram956v+YIV8w8VpwJnQ'); -INSERT INTO "user_role" (user_id, role_id) VALUES(3,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(3,3); -INSERT INTO "user" (name, pw) VALUES('cox', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$lnWzHx3DdqS9GQyWYel82kIotZuK2wk9EyfhPFtjNzs'); -INSERT INTO "user_role" (user_id, role_id) VALUES(4,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(4,2); -INSERT INTO "user_role" (user_id, role_id) VALUES(4,8); -INSERT INTO "user" (name) VALUES('new'); -INSERT INTO "user_role" (user_id, role_id) VALUES(5,5); -INSERT INTO "user" (name, pw) VALUES('cox2', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$lnWzHx3DdqS9GQyWYel82kIotZuK2wk9EyfhPFtjNzs'); -INSERT INTO "user_role" (user_id, role_id) VALUES(6,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(6,2); -INSERT INTO "user" (name, pw) VALUES('rower2', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$jWKzDmI0jqT2dqINFt6/1NjVF4Dx15n07PL1ZMBmFsY'); -INSERT INTO "user_role" (user_id, role_id) VALUES(7,5); -INSERT INTO "user" (name, pw) VALUES('teen', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$jWKzDmI0jqT2dqINFt6/1NjVF4Dx15n07PL1ZMBmFsY'); -INSERT INTO "user_role" (user_id, role_id) VALUES(8,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(8,7); -INSERT INTO "user" (name, pw) VALUES('Vorstandsmitglied', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$jWKzDmI0jqT2dqINFt6/1NjVF4Dx15n07PL1ZMBmFsY'); -INSERT INTO "user_role" (user_id, role_id) VALUES(9,5); -INSERT INTO "user" (name, pw) VALUES('main', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM'); -INSERT INTO "user_role" (user_id, role_id) VALUES(10,1); -INSERT INTO "user_role" (user_id, role_id) VALUES(10,2); -INSERT INTO "user_role" (user_id, role_id) VALUES(10,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(10,6); -INSERT INTO "user_role" (user_id, role_id) VALUES(10,9); -INSERT INTO "user" (name, pw) VALUES('Lukas Rudinger', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM'); --11 -INSERT INTO "user_role" (user_id, role_id) VALUES(11,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(11,2); -INSERT INTO "user_role" (user_id, role_id) VALUES(11,8); -INSERT INTO "user" (name, pw) VALUES('Claudia Fröhlich', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM'); --12 -INSERT INTO "user_role" (user_id, role_id) VALUES(12,6); -INSERT INTO "user_role" (user_id, role_id) VALUES(12,5); -INSERT INTO "user" (name, pw) VALUES('Adeline Krebs', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM'); --13 -INSERT INTO "user_role" (user_id, role_id) VALUES(13,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(13,2); -INSERT INTO "user_role" (user_id, role_id) VALUES(13,8); -INSERT INTO "user" (name, pw) VALUES('Michael Schweiß', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM'); --13 -INSERT INTO "user_role" (user_id, role_id) VALUES(14,5); -INSERT INTO "user_role" (user_id, role_id) VALUES(14,8); - -INSERT INTO "trip_details" (planned_starting_time, max_people, day, notes) VALUES('06:00', 4, date('now'), ''); -INSERT INTO "trip" (cox_id, trip_details_id) VALUES(13, 1); - -INSERT INTO "trip_details" (planned_starting_time, max_people, day, notes) VALUES('14:00', 8, date('now'), 'Lasst uns den Markt entern!!'); -INSERT INTO "planned_event" (name, planned_amount_cox, trip_details_id) VALUES('Marktfahrt', 2, 2); - -INSERT INTO "trip_details" (planned_starting_time, max_people, day, notes) VALUES('17:00', 4, date('now'), 'Feierabend-Ausfahrt'); -INSERT INTO "trip" (cox_id, trip_details_id) VALUES(11, 3); - -INSERT INTO "trip_details" (planned_starting_time, max_people, day, notes) VALUES('18:00', 8, date('now'), ''); -INSERT INTO "planned_event" (name, planned_amount_cox, trip_details_id) VALUES('Anfängertraining Ergo', 1, 4); - -INSERT INTO "trip_details" (planned_starting_time, max_people, day, notes) VALUES('14:00', 4, date('now', '+1 day'), 'Der frühe Wurm wird vom Vogel gefressen!'); -INSERT INTO "trip" (cox_id, trip_details_id) VALUES(13, 5); - -INSERT INTO "trip_type" (name, desc, question, icon) VALUES ('Regatta', 'Regatta!', 'Kein normales Event. Das ist eine Regatta! Willst du wirklich teilnehmen?', '🏅'); -INSERT INTO "trip_type" (name, desc, question, icon) VALUES ('Lange Ausfahrt', 'Lange Ausfahrt!', 'Das ist eine lange Ausfahrt! Willst du wirklich teilnehmen?', '💪'); -INSERT INTO "trip_type" (name, desc, question, icon) VALUES ('Wanderfahrt', 'Wanderfahrt!', 'Kein normales Event. Das ist eine Wanderfahrt! Bitte überprüfe ob du alle Anforderungen erfüllst. Willst du wirklich teilnehmen?', '⛱'); -INSERT INTO "location" (name) VALUES ('Linz'); -INSERT INTO "location" (name) VALUES ('Ottensheim'); -INSERT INTO "boat" (name, amount_seats, location_id) VALUES ('Haichenbach', 1, 1); -INSERT INTO "boat" (name, amount_seats, location_id, owner) VALUES ('private_boat_from_rower', 1, 1, 2); -INSERT INTO "boat" (name, amount_seats, location_id) VALUES ('Joe', 2, 1); -INSERT INTO "boat" (name, amount_seats, location_id) VALUES ('Kaputtes Boot :-(', 7, 1); -INSERT INTO "boat" (name, amount_seats, location_id) VALUES ('Sehr kaputtes Boot :-((', 7, 1); -INSERT INTO "boat" (name, amount_seats, location_id) VALUES ('Ottensheim Boot', 7, 2); -INSERT INTO "boat" (name, amount_seats, location_id, owner) VALUES ('second_private_boat_from_rower', 1, 1, 2); -INSERT INTO "boat" (name, amount_seats, location_id, default_shipmaster_only_steering) VALUES ('cox_only_steering_boat', 3, 1, true); -INSERT INTO "logbook_type" (name) VALUES ('Wanderfahrt'); -INSERT INTO "logbook_type" (name) VALUES ('Regatta'); -INSERT INTO "logbook" (boat_id, shipmaster,steering_person, shipmaster_only_steering, departure) VALUES (2, 2, 2, false, strftime('%Y', 'now') || '-12-24 10:00'); -INSERT INTO "logbook" (boat_id, shipmaster, steering_person, shipmaster_only_steering, departure, arrival, destination, distance_in_km) VALUES (1, 4, 4, false, strftime('%Y', 'now') || '-12-24 10:00', strftime('%Y', 'now') || '-12-24 15:00', 'Ottensheim', 25); -INSERT INTO "logbook" (boat_id, shipmaster, steering_person, shipmaster_only_steering, departure, arrival, destination, distance_in_km) VALUES (3, 4, 4, false, strftime('%Y', 'now') || '-12-24 10:00', strftime('%Y', 'now') || '-12-24 11:30', 'Ottensheim + Regattastrecke', 29); -INSERT INTO "rower" (logbook_id, rower_id) VALUES(3,3); -INSERT INTO "boat_damage" (boat_id, desc, user_id_created, created_at) VALUES(4,'Dolle bei Position 2 fehlt', 5, '2142-12-24 15:02'); -INSERT INTO "boat_damage" (boat_id, desc, user_id_created, created_at, lock_boat) VALUES(5, 'TOHT', 5, '2142-12-24 15:02', 1); -INSERT INTO "notification" (user_id, message, category) VALUES (1, 'This is a test notification', 'test-cat'); -INSERT INTO "trailer" (name) VALUES('Großer Hänger'); -INSERT INTO "trailer" (name) VALUES('Kleiner Hänger'); -insert into distance(destination, distance_in_km) values('Ottensheim', 25); - diff --git a/seeds_initial.sql b/seeds_initial.sql new file mode 100644 index 0000000..1714844 --- /dev/null +++ b/seeds_initial.sql @@ -0,0 +1,22 @@ +INSERT INTO "role" (name) VALUES ('admin'); +INSERT INTO "role" (name) VALUES ('cox'); +INSERT INTO "role" (name) VALUES ('scheckbuch'); +INSERT INTO "role" (name) VALUES ('manage_events'); + +INSERT INTO "user" (name) VALUES('admin'); +INSERT INTO "user_role" (user_id, role_id) VALUES(1,1); +INSERT INTO "user_role" (user_id, role_id) VALUES(1,2); +INSERT INTO "user_role" (user_id, role_id) VALUES(1,4); +INSERT INTO "user" (name) VALUES('steuerperson'); +INSERT INTO "user_role" (user_id, role_id) VALUES(2,2); +INSERT INTO "user" (name) VALUES('anfaenger'); +INSERT INTO "user_role" (user_id, role_id) VALUES(3,3); + +INSERT INTO trip_type VALUES(1,'Regatta','Regatta!','Kein normales Event. Das ist eine Regatta! Willst du wirklich teilnehmen?','🏅'); +INSERT INTO trip_type VALUES(2,'Lange Ausfahrt','Lange Ausfahrt!','Das ist eine lange Ausfahrt! Willst du wirklich teilnehmen?','💪'); +INSERT INTO trip_type VALUES(3,'Wanderfahrt','Wanderfahrt!','Kein normales Event. Das ist eine Wanderfahrt! Bitte überprüfe ob du alle Anforderungen erfüllst. Willst du wirklich teilnehmen?','⛱'); +INSERT INTO trip_type VALUES(4,'Ergo','Ergo-Fahrt im Bootshaus','Das ist keine Fahrt auf der Donau, sondern eine tolle Ergo-Einheit im Bootshaus. Willst du teilnehmen?','🏠'); +INSERT INTO trip_type VALUES(5,'Ruderbecken','Ruderbecken-Training','Das ist ein Training im Ruderbecken. Willst du teilnehmen?','🏠'); +INSERT INTO trip_type VALUES(6,'Theorie','Theorie','Das ist keine Ausfahrt. Stattdessen wirst du mit zusätzlichem Wissen belohnt. Willst du teilnehmen?','📚'); +INSERT INTO trip_type VALUES(7,'Arbeitspartie','Arbeitspartie','Keine Ausfahrt, sondern eine Arbeitspartie im Bootshaus. Willst du teilnehmen?','🧹'); +INSERT INTO trip_type VALUES(8,'Einer-Ausfahrt','1x Ausfahrt','Das ist eine Ausfahrt in Einer-Booten (1x). Willst du teilnehmen?','1️⃣'); diff --git a/src/model/user.rs b/src/model/user.rs index 7a6a0aa..344d4c2 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -641,19 +641,8 @@ mod test { &pool, UserEditForm { id: 1, - dob: None, - weight: None, - sex: Some("m".into()), + name: "adminn".to_string(), roles: HashMap::new(), - member_since_date: None, - birthdate: None, - mail: None, - nickname: None, - notes: None, - phone: None, - address: None, - family_id: None, - membership_pdf: None, }, ) .await @@ -661,7 +650,7 @@ mod test { let user = User::find_by_id(&pool, 1).await.unwrap(); - assert_eq!(user.sex, Some("m".into())); + assert_eq!(user.name, "adminn".to_string()); } #[sqlx::test]