make scheckbuch user behave as previously, but in own file
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2025-04-29 21:00:50 +02:00
parent 876451fc02
commit 7604678d4a
8 changed files with 42 additions and 32 deletions

View File

@ -256,7 +256,7 @@ mod test {
let trip_details = TripDetails::find_by_id(&pool, tripdetails_id)
.await
.unwrap();
let user = EventUser::new(&pool, User::find_by_id(&pool, 1).await.unwrap())
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;
@ -269,7 +269,7 @@ mod test {
UserTrip::create(&pool, &rower, &trip_details, None)
.await
.unwrap();
let cox = SteeringUser::new(&pool, User::find_by_name(&pool, "cox").await.unwrap())
let cox = SteeringUser::new(&pool, &User::find_by_name(&pool, "cox").await.unwrap())
.await
.unwrap();
Trip::new_join(&pool, &cox, &event).await.unwrap();
@ -284,7 +284,7 @@ mod test {
is_locked: event.is_locked,
trip_type_id: None,
};
event.update(&pool, &cancel_update).await;
event.update(&pool, &user, &cancel_update).await;
// Rower received notification
let notifications = Notification::for_user(&pool, &rower).await;
@ -314,12 +314,12 @@ mod test {
is_locked: event.is_locked,
trip_type_id: None,
};
event.update(&pool, &update).await;
event.update(&pool, &user, &update).await;
assert!(Notification::for_user(&pool, &rower).await.is_empty());
assert!(Notification::for_user(&pool, &cox.user).await.is_empty());
// Cancel event again
event.update(&pool, &cancel_update).await;
event.update(&pool, &user, &cancel_update).await;
// Rower is removed if notification is accepted
assert!(event.is_rower_registered(&pool, &rower).await);