Feat: Out of office autoresponder (#2992)
This change allows the user to enable autoresponder during the out-of-office time. Fixes: #2035
This commit is contained in:
@@ -26,4 +26,28 @@ RSpec.describe WorkingHour do
|
||||
expect(described_class.today.closed_now?).to be true
|
||||
end
|
||||
end
|
||||
|
||||
context 'when on friday 12:30pm' do
|
||||
before do
|
||||
Time.zone = 'UTC'
|
||||
create(:working_hour)
|
||||
travel_to '10.09.2021 12:30'.to_datetime
|
||||
end
|
||||
|
||||
it 'is considered to be in business hours' do
|
||||
expect(described_class.today.open_now?).to be true
|
||||
end
|
||||
end
|
||||
|
||||
context 'when on friday 17:30pm' do
|
||||
before do
|
||||
Time.zone = 'UTC'
|
||||
create(:working_hour)
|
||||
travel_to '10.09.2021 17:30'.to_datetime
|
||||
end
|
||||
|
||||
it 'is considered out of office' do
|
||||
expect(described_class.today.closed_now?).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user