feat: Business hour Inbox APIs (#1821)

* feat: Business hour Inbox APIs
This commit is contained in:
Sojan Jose
2021-02-23 12:11:15 +05:30
committed by GitHub
parent a3b0de63de
commit 0e721653e5
14 changed files with 86 additions and 23 deletions

View File

@@ -16,4 +16,10 @@ shared_examples_for 'out_of_offisable' do
travel_to '01.11.2020 13:00'.to_datetime
expect(obj.out_of_office?).to be true
end
it 'updates the office hours via a hash' do
obj.update_working_hours([{ 'day_of_week' => 1, 'open_hour' => 10, 'open_minutes' => 0,
'close_hour' => 17, 'close_minutes' => 0 }])
expect(obj.reload.weekly_schedule.find { |schedule| schedule['day_of_week'] == 1 }['open_hour']).to eq 10
end
end