From 61426f6d6f5492a4585d822e904e34bccc38c9a9 Mon Sep 17 00:00:00 2001 From: Eloi Charpentier Date: Fri, 22 Nov 2024 10:43:29 +0100 Subject: [PATCH] fixup! fixup! editoast: work-schedules: add endpoints for easier edition and viewing --- editoast/src/views/work_schedules.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editoast/src/views/work_schedules.rs b/editoast/src/views/work_schedules.rs index 6a86ce5e38d..8071fd59886 100644 --- a/editoast/src/views/work_schedules.rs +++ b/editoast/src/views/work_schedules.rs @@ -756,11 +756,12 @@ pub mod tests { let work_schedule_url = format!("/work_schedules/group/{group_id}"); // Add a work schedule + let ref_obj_id = Uuid::new_v4().to_string(); let request = app.put(&work_schedule_url).json(&json!([{ "start_date_time": "2024-01-01T08:00:00Z", "end_date_time": "2024-01-01T09:00:00Z", "track_ranges": [], - "obj_id": "work_schedule_obj_id", + "obj_id": ref_obj_id, "work_schedule_type": "CATENARY" }] )); @@ -773,6 +774,7 @@ pub mod tests { .assert_status(StatusCode::OK) .json_into::>(); assert_eq!(1, work_schedules.len()); + assert_eq!(ref_obj_id, work_schedules[0].obj_id); // Delete it let request = app.delete(&work_schedule_url);