Skip to content

Commit

Permalink
fixup! fixup! editoast: work-schedules: add endpoints for easier edit…
Browse files Browse the repository at this point in the history
…ion and viewing
  • Loading branch information
eckter committed Nov 22, 2024
1 parent 64d4756 commit 61426f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editoast/src/views/work_schedules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}]
));
Expand All @@ -773,6 +774,7 @@ pub mod tests {
.assert_status(StatusCode::OK)
.json_into::<Vec<WorkSchedule>>();
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);
Expand Down

0 comments on commit 61426f6

Please sign in to comment.