fix tests
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled

This commit is contained in:
2024-11-11 15:26:33 +01:00
parent d5e6371b89
commit d7eaa14e55
2 changed files with 16 additions and 4 deletions

View File

@ -221,7 +221,7 @@ mod test {
notification::Notification,
trip::Trip,
tripdetails::{TripDetails, TripDetailsToAdd},
user::{SteeringUser, User},
user::{EventUser, SteeringUser, User},
usertrip::UserTrip,
},
testdb,
@ -247,7 +247,10 @@ mod test {
let trip_details = TripDetails::find_by_id(&pool, tripdetails_id)
.await
.unwrap();
Event::create(&pool, "new-event".into(), 2, false, &trip_details).await;
let user = EventUser::new(&pool, User::find_by_id(&pool, 1).await.unwrap())
.await
.unwrap();
Event::create(&pool, &user, "new-event".into(), 2, false, &trip_details).await;
let event = Event::find_by_trip_details(&pool, trip_details.id)
.await
.unwrap();