Adjust shift plan based on authentication

This commit is contained in:
Simon Goller 2024-06-14 13:23:12 +02:00
parent f894bf325d
commit b4b926a8e4
10 changed files with 499 additions and 97 deletions

View file

@ -1,10 +1,10 @@
use crate::test::error_test::*;
use dao::booking::{BookingEntity, MockBookingDao};
use mockall::predicate::eq;
use mockall::predicate::{always, eq};
use service::{
booking::Booking, clock::MockClockService, sales_person::MockSalesPersonService,
slot::MockSlotService, uuid_service::MockUuidService, MockPermissionService,
ValidationFailureItem,
booking::Booking, clock::MockClockService, permission::Authentication,
sales_person::MockSalesPersonService, slot::MockSlotService, uuid_service::MockUuidService,
MockPermissionService, ValidationFailureItem,
};
use time::{Date, Month, PrimitiveDateTime, Time};
use uuid::{uuid, Uuid};
@ -147,7 +147,7 @@ pub fn build_dependencies(permission: bool, role: &'static str) -> BookingServic
#[tokio::test]
async fn test_get_all() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.booking_dao.expect_all().returning(|| {
Ok([
default_booking_entity(),
@ -160,6 +160,7 @@ async fn test_get_all() {
});
let service = deps.build_service();
let result = service.get_all(().auth()).await;
dbg!(&result);
assert!(result.is_ok());
let result = result.unwrap();
assert_eq!(result.len(), 2);
@ -175,7 +176,7 @@ async fn test_get_all() {
#[tokio::test]
async fn test_get_all_no_permission() {
let deps = build_dependencies(false, "hr");
let deps = build_dependencies(false, "shiftplanner");
let service = deps.build_service();
let result = service.get_all(().auth()).await;
test_forbidden(&result);
@ -183,7 +184,7 @@ async fn test_get_all_no_permission() {
#[tokio::test]
async fn test_get() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.booking_dao
.expect_find_by_id()
.with(eq(default_id()))
@ -196,7 +197,7 @@ async fn test_get() {
#[tokio::test]
async fn test_get_not_found() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.booking_dao
.expect_find_by_id()
.with(eq(default_id()))
@ -208,7 +209,7 @@ async fn test_get_not_found() {
#[tokio::test]
async fn test_get_no_permission() {
let deps = build_dependencies(false, "hr");
let deps = build_dependencies(false, "shiftplanner");
let service = deps.build_service();
let result = service.get(default_id(), ().auth()).await;
test_forbidden(&result);
@ -227,8 +228,8 @@ async fn test_get_for_week() {
}
#[tokio::test]
async fn test_get_for_week_hr_role() {
let mut deps = build_dependencies(true, "hr");
async fn test_get_for_week_shiftplanner_role() {
let mut deps = build_dependencies(true, "shiftplanner");
deps.booking_dao
.expect_find_by_week()
.with(eq(3), eq(2024))
@ -240,7 +241,7 @@ async fn test_get_for_week_hr_role() {
#[tokio::test]
async fn test_get_for_week_no_permission() {
let deps = build_dependencies(false, "hr");
let deps = build_dependencies(false, "shiftplanner");
let service = deps.build_service();
let result = service.get_for_week(3, 2024, ().auth()).await;
test_forbidden(&result);
@ -248,7 +249,7 @@ async fn test_get_for_week_no_permission() {
#[tokio::test]
async fn test_create() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.booking_dao
.expect_create()
.with(
@ -289,9 +290,144 @@ async fn test_create() {
);
}
#[tokio::test]
async fn test_create_sales_user() {
let mut deps = build_dependencies(true, "sales");
deps.booking_dao
.expect_create()
.with(
eq(BookingEntity {
created: generate_default_datetime(),
..default_booking_entity()
}),
eq("booking-service"),
)
.returning(|_, _| Ok(()));
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-id"))
.returning(|_| default_id());
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-version"))
.returning(|_| default_version());
deps.sales_person_service
.expect_get_assigned_user()
.with(eq(default_sales_person_id()), always())
.returning(|_, _| Ok(Some("TESTUSER".into())));
deps.permission_service
.expect_check_user()
.with(eq("TESTUSER"), always())
.returning(|_, _| Ok(()));
let service = deps.build_service();
let result = service
.create(
&Booking {
id: Uuid::nil(),
version: Uuid::nil(),
created: None,
..default_booking()
},
().auth(),
)
.await;
assert!(result.is_ok());
assert_eq!(
result.unwrap(),
Booking {
created: Some(generate_default_datetime()),
..default_booking()
}
);
}
#[tokio::test]
async fn test_create_sales_user_not_exist() {
let mut deps = build_dependencies(true, "sales");
deps.booking_dao
.expect_create()
.with(
eq(BookingEntity {
created: generate_default_datetime(),
..default_booking_entity()
}),
eq("booking-service"),
)
.returning(|_, _| Ok(()));
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-id"))
.returning(|_| default_id());
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-version"))
.returning(|_| default_version());
deps.sales_person_service
.expect_get_assigned_user()
.with(eq(default_sales_person_id()), always())
.returning(|_, _| Ok(Some("TESTUSER".into())));
deps.permission_service
.expect_check_user()
.with(eq("TESTUSER"), always())
.returning(|_, _| Err(service::ServiceError::Forbidden));
let service = deps.build_service();
let result = service
.create(
&Booking {
id: Uuid::nil(),
version: Uuid::nil(),
created: None,
..default_booking()
},
().auth(),
)
.await;
test_forbidden(&result);
}
#[tokio::test]
async fn test_create_sales_user_no_permission() {
let mut deps = build_dependencies(true, "sales");
deps.booking_dao
.expect_create()
.with(
eq(BookingEntity {
created: generate_default_datetime(),
..default_booking_entity()
}),
eq("booking-service"),
)
.returning(|_, _| Ok(()));
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-id"))
.returning(|_| default_id());
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-version"))
.returning(|_| default_version());
deps.sales_person_service
.expect_get_assigned_user()
.with(eq(default_sales_person_id()), always())
.returning(|_, _| Ok(None));
let service = deps.build_service();
let result = service
.create(
&Booking {
id: Uuid::nil(),
version: Uuid::nil(),
created: None,
..default_booking()
},
().auth(),
)
.await;
test_forbidden(&result);
}
#[tokio::test]
async fn test_create_no_permission() {
let deps = build_dependencies(false, "hr");
let deps = build_dependencies(false, "shiftplanner");
let service = deps.build_service();
let result = service
.create(
@ -308,7 +444,7 @@ async fn test_create_no_permission() {
#[tokio::test]
async fn test_create_with_id() {
let deps = build_dependencies(true, "hr");
let deps = build_dependencies(true, "shiftplanner");
let service = deps.build_service();
let result = service
.create(
@ -324,7 +460,7 @@ async fn test_create_with_id() {
#[tokio::test]
async fn test_create_with_version() {
let deps = build_dependencies(true, "hr");
let deps = build_dependencies(true, "shiftplanner");
let service = deps.build_service();
let result = service
.create(
@ -340,7 +476,7 @@ async fn test_create_with_version() {
#[tokio::test]
async fn test_create_with_created_fail() {
let deps = build_dependencies(true, "hr");
let deps = build_dependencies(true, "shiftplanner");
let service = deps.build_service();
let result = service
.create(
@ -361,11 +497,11 @@ async fn test_create_with_created_fail() {
#[tokio::test]
async fn test_create_sales_person_does_not_exist() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.sales_person_service.checkpoint();
deps.sales_person_service
.expect_exists()
.with(eq(default_sales_person_id()), eq(().auth()))
.with(eq(default_sales_person_id()), eq(Authentication::Full))
.returning(|_, _| Ok(false));
let service = deps.build_service();
let result = service
@ -389,7 +525,7 @@ async fn test_create_sales_person_does_not_exist() {
#[tokio::test]
async fn test_create_booking_data_already_exists() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.booking_dao.checkpoint();
deps.booking_dao
.expect_find_by_booking_data()
@ -417,11 +553,11 @@ async fn test_create_booking_data_already_exists() {
#[tokio::test]
async fn test_create_slot_does_not_exist() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.slot_service.checkpoint();
deps.slot_service
.expect_exists()
.with(eq(default_slot_id()), eq(().auth()))
.with(eq(default_slot_id()), eq(Authentication::Full))
.returning(|_, _| Ok(false));
let service = deps.build_service();
let result = service
@ -444,7 +580,11 @@ async fn test_create_slot_does_not_exist() {
#[tokio::test]
async fn test_delete_no_permission() {
let deps = build_dependencies(false, "hr");
let mut deps = build_dependencies(false, "shiftplanner");
deps.booking_dao
.expect_find_by_id()
.with(eq(default_id()))
.returning(|_| Ok(Some(default_booking_entity())));
let service = deps.build_service();
let result = service.delete(default_id(), ().auth()).await;
test_forbidden(&result);
@ -452,7 +592,7 @@ async fn test_delete_no_permission() {
#[tokio::test]
async fn test_delete_not_found() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.booking_dao
.expect_find_by_id()
.with(eq(default_id()))
@ -464,7 +604,7 @@ async fn test_delete_not_found() {
#[tokio::test]
async fn test_delete() {
let mut deps = build_dependencies(true, "hr");
let mut deps = build_dependencies(true, "shiftplanner");
deps.booking_dao
.expect_find_by_id()
.with(eq(default_id()))
@ -489,3 +629,105 @@ async fn test_delete() {
assert!(result.is_ok());
assert_eq!(result.unwrap(), ());
}
#[tokio::test]
async fn test_delete_sales_user() {
let mut deps = build_dependencies(true, "sales");
deps.booking_dao
.expect_find_by_id()
.with(eq(default_id()))
.returning(|_| Ok(Some(default_booking_entity())));
deps.booking_dao
.expect_update()
.with(
eq(BookingEntity {
deleted: Some(generate_default_datetime()),
version: alternate_version(),
..default_booking_entity()
}),
eq("booking-service"),
)
.returning(|_, _| Ok(()));
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-version"))
.returning(|_| alternate_version());
deps.sales_person_service
.expect_get_assigned_user()
.with(eq(default_sales_person_id()), always())
.returning(|_, _| Ok(Some("TESTUSER".into())));
deps.permission_service
.expect_check_user()
.with(eq("TESTUSER"), always())
.returning(|_, _| Ok(()));
let service = deps.build_service();
let result = service.delete(default_id(), ().auth()).await;
assert!(result.is_ok());
assert_eq!(result.unwrap(), ());
}
#[tokio::test]
async fn test_delete_sales_user_not_exists() {
let mut deps = build_dependencies(true, "sales");
deps.booking_dao
.expect_find_by_id()
.with(eq(default_id()))
.returning(|_| Ok(Some(default_booking_entity())));
deps.booking_dao
.expect_update()
.with(
eq(BookingEntity {
deleted: Some(generate_default_datetime()),
version: alternate_version(),
..default_booking_entity()
}),
eq("booking-service"),
)
.returning(|_, _| Ok(()));
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-version"))
.returning(|_| alternate_version());
deps.sales_person_service
.expect_get_assigned_user()
.with(eq(default_sales_person_id()), always())
.returning(|_, _| Ok(None));
let service = deps.build_service();
let result = service.delete(default_id(), ().auth()).await;
test_forbidden(&result);
}
#[tokio::test]
async fn test_delete_sales_user_not_allowed() {
let mut deps = build_dependencies(true, "sales");
deps.booking_dao
.expect_find_by_id()
.with(eq(default_id()))
.returning(|_| Ok(Some(default_booking_entity())));
deps.booking_dao
.expect_update()
.with(
eq(BookingEntity {
deleted: Some(generate_default_datetime()),
version: alternate_version(),
..default_booking_entity()
}),
eq("booking-service"),
)
.returning(|_, _| Ok(()));
deps.uuid_service
.expect_new_uuid()
.with(eq("booking-version"))
.returning(|_| alternate_version());
deps.sales_person_service
.expect_get_assigned_user()
.with(eq(default_sales_person_id()), always())
.returning(|_, _| Ok(Some("TESTUSER".into())));
deps.permission_service
.expect_check_user()
.with(eq("TESTUSER"), always())
.returning(|_, _| Err(service::ServiceError::Forbidden));
let service = deps.build_service();
let result = service.delete(default_id(), ().auth()).await;
test_forbidden(&result);
}

View file

@ -112,7 +112,35 @@ pub fn default_sales_person() -> service::sales_person::SalesPerson {
#[tokio::test]
async fn test_get_all() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies.sales_person_dao.expect_all().returning(|| {
Ok([
default_sales_person_entity(),
SalesPersonEntity {
id: alternate_id(),
name: "Jane Doe".into(),
..default_sales_person_entity()
},
]
.into())
});
let sales_person_service = dependencies.build_service();
let result = sales_person_service.get_all(().auth()).await.unwrap();
assert_eq!(2, result.len());
assert_eq!(default_sales_person(), result[0]);
assert_eq!(
service::sales_person::SalesPerson {
id: alternate_id(),
name: "Jane Doe".into(),
..default_sales_person()
},
result[1]
);
}
#[tokio::test]
async fn test_get_all_sales_user() {
let mut dependencies = build_dependencies(true, "sales");
dependencies.sales_person_dao.expect_all().returning(|| {
Ok([
default_sales_person_entity(),
@ -148,7 +176,21 @@ async fn test_get_all_no_permission() {
#[tokio::test]
async fn test_get() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.sales_person_dao
.expect_find_by_id()
.with(eq(default_id()))
.times(1)
.returning(|_| Ok(Some(default_sales_person_entity())));
let sales_person_service = dependencies.build_service();
let result = sales_person_service.get(default_id(), ().auth()).await;
assert_eq!(default_sales_person(), result.unwrap());
}
#[tokio::test]
async fn test_get_sales_user() {
let mut dependencies = build_dependencies(true, "sales");
dependencies
.sales_person_dao
.expect_find_by_id()
@ -162,7 +204,7 @@ async fn test_get() {
#[tokio::test]
async fn test_get_no_permission() {
let dependencies = build_dependencies(false, "hr");
let dependencies = build_dependencies(false, "sales");
let sales_person_service = dependencies.build_service();
let result = sales_person_service.get(default_id(), ().auth()).await;
test_forbidden(&result);
@ -170,7 +212,21 @@ async fn test_get_no_permission() {
#[tokio::test]
async fn test_get_not_found() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.sales_person_dao
.expect_find_by_id()
.with(eq(default_id()))
.times(1)
.returning(|_| Ok(None));
let sales_person_service = dependencies.build_service();
let result = sales_person_service.get(default_id(), ().auth()).await;
test_not_found(&result, &default_id());
}
#[tokio::test]
async fn test_get_not_found_sales_user() {
let mut dependencies = build_dependencies(true, "sales");
dependencies
.sales_person_dao
.expect_find_by_id()

View file

@ -108,7 +108,7 @@ pub fn build_dependencies(permission: bool, role: &'static str) -> SlotServiceDe
#[tokio::test]
async fn test_get_slots() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies.slot_dao.expect_get_slots().returning(|| {
Ok(Arc::new([
SlotEntity {
@ -140,7 +140,7 @@ async fn test_get_slots() {
#[tokio::test]
async fn test_get_slots_sales_role() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slots()
@ -152,7 +152,7 @@ async fn test_get_slots_sales_role() {
#[tokio::test]
async fn test_get_slots_no_permission() {
let mut dependencies = build_dependencies(false, "hr");
let mut dependencies = build_dependencies(false, "shiftplanner");
dependencies
.slot_dao
.expect_get_slots()
@ -164,7 +164,7 @@ async fn test_get_slots_no_permission() {
#[tokio::test]
async fn test_get_slot() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -194,7 +194,7 @@ async fn test_get_slot_sales_role() {
#[tokio::test]
async fn test_get_slot_not_found() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -208,7 +208,7 @@ async fn test_get_slot_not_found() {
#[tokio::test]
async fn test_get_slot_no_permission() {
let dependencies = build_dependencies(false, "hr");
let dependencies = build_dependencies(false, "shiftplanner");
let slot_service = dependencies.build_service();
let result = slot_service.get_slot(&default_id(), ().auth()).await;
test_forbidden(&result);
@ -216,7 +216,7 @@ async fn test_get_slot_no_permission() {
#[tokio::test]
async fn test_create_slot() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_create_slot()
@ -255,7 +255,7 @@ async fn test_create_slot() {
#[tokio::test]
async fn test_create_slot_no_permission() {
let dependencies = build_dependencies(false, "hr");
let dependencies = build_dependencies(false, "shiftplanner");
let slot_service = dependencies.build_service();
let result = slot_service
.create_slot(&generate_default_slot(), ().auth())
@ -265,7 +265,7 @@ async fn test_create_slot_no_permission() {
#[tokio::test]
async fn test_create_slot_non_zero_id() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.uuid_service
.expect_new_uuid()
@ -291,7 +291,7 @@ async fn test_create_slot_non_zero_id() {
#[tokio::test]
async fn test_create_slot_non_zero_version() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.uuid_service
.expect_new_uuid()
@ -317,7 +317,7 @@ async fn test_create_slot_non_zero_version() {
#[tokio::test]
async fn test_create_slot_intersects() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies.slot_dao.expect_get_slots().returning(|| {
Ok(Arc::new([
generate_default_slot_entity(),
@ -460,7 +460,7 @@ async fn test_create_slot_intersects() {
#[tokio::test]
async fn test_create_slot_time_order() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_create_slot()
@ -488,7 +488,7 @@ async fn test_create_slot_time_order() {
#[tokio::test]
async fn test_create_slot_date_order() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_create_slot()
@ -516,7 +516,7 @@ async fn test_create_slot_date_order() {
#[tokio::test]
async fn test_delete_slot() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -546,7 +546,7 @@ async fn test_delete_slot() {
#[tokio::test]
async fn test_delete_slot_no_permission() {
let dependencies = build_dependencies(false, "hr");
let dependencies = build_dependencies(false, "shiftplanner");
let slot_service = dependencies.build_service();
let result = slot_service.delete_slot(&default_id(), ().auth()).await;
test_forbidden(&result);
@ -554,7 +554,7 @@ async fn test_delete_slot_no_permission() {
#[tokio::test]
async fn test_delete_slot_not_found() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -568,7 +568,7 @@ async fn test_delete_slot_not_found() {
#[tokio::test]
async fn test_update_slot_no_permission() {
let dependencies = build_dependencies(false, "hr");
let dependencies = build_dependencies(false, "shiftplanner");
let slot_service = dependencies.build_service();
let result = slot_service
.update_slot(&generate_default_slot(), ().auth())
@ -578,7 +578,7 @@ async fn test_update_slot_no_permission() {
#[tokio::test]
async fn test_update_slot_not_found() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -594,7 +594,7 @@ async fn test_update_slot_not_found() {
#[tokio::test]
async fn test_update_slot_version_mismatch() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -620,7 +620,7 @@ async fn test_update_slot_version_mismatch() {
#[tokio::test]
async fn test_update_slot_valid_to() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_update_slot()
@ -666,7 +666,7 @@ async fn test_update_slot_valid_to() {
#[tokio::test]
async fn test_update_slot_valid_to_before_valid_from() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -690,7 +690,7 @@ async fn test_update_slot_valid_to_before_valid_from() {
#[tokio::test]
async fn test_update_slot_deleted() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -736,7 +736,7 @@ async fn test_update_slot_deleted() {
#[tokio::test]
async fn test_update_slot_day_of_week_forbidden() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -761,7 +761,7 @@ async fn test_update_slot_day_of_week_forbidden() {
#[tokio::test]
async fn test_update_to_forbidden_when_not_none() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -795,7 +795,7 @@ async fn test_update_to_forbidden_when_not_none() {
#[tokio::test]
async fn test_update_from_forbidden() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -820,7 +820,7 @@ async fn test_update_from_forbidden() {
#[tokio::test]
async fn test_update_to_forbidden() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -845,7 +845,7 @@ async fn test_update_to_forbidden() {
#[tokio::test]
async fn test_update_valid_from_forbidden() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()
@ -871,7 +871,7 @@ async fn test_update_valid_from_forbidden() {
#[tokio::test]
async fn test_update_valid_multiple_forbidden_changes() {
let mut dependencies = build_dependencies(true, "hr");
let mut dependencies = build_dependencies(true, "shiftplanner");
dependencies
.slot_dao
.expect_get_slot()