Skip to content

Commit

Permalink
test(auto_release): add work_preferences and work_overrides to test mock
Browse files Browse the repository at this point in the history
  • Loading branch information
chillfox committed Feb 15, 2024
1 parent 6750a90 commit 0711ef5
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion drivers/place/auto_release_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,58 @@ class StaffAPI < DriverSpecs::MockDriver
authority_id: "authority-wYLBwmC7GFbupt",
deleted: false,
department: "",
work_preferences: [
{
day_of_week: 0,
start_time: 9,
end_time: 17,
location: "wfo",
},
{
day_of_week: 1,
start_time: 9,
end_time: 17,
location: "wfo",
},
{
day_of_week: 2,
start_time: 9,
end_time: 17,
location: "wfh",
},
{
day_of_week: 3,
start_time: 9,
end_time: 17,
location: "wfh",
},
{
day_of_week: 4,
start_time: 9,
end_time: 17,
location: "wfh",
},
{
day_of_week: 5,
start_time: 9,
end_time: 17,
location: "wfh",
},
{
day_of_week: 6,
start_time: 9,
end_time: 17,
location: "wfo",
},
],
work_overrides: {
"2024-02-15": {
day_of_week: 4,
start_time: 9,
end_time: 17,
location: "wfo",
}
},
sys_admin: false,
support: false,
email: "[email protected]",
Expand All @@ -69,7 +121,7 @@ class StaffAPI < DriverSpecs::MockDriver
staff_id: "",
card_number: "",
}

JSON.parse(user.to_json)
end
end
Expand Down

0 comments on commit 0711ef5

Please sign in to comment.