Skip to content

Commit

Permalink
Fix inpost week hours (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
pellytw authored Jan 12, 2023
1 parent 39817c2 commit aef8f04
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def formatted_timetable(result)
week_hours = get_week_hours_from_result(result)
week_hours.each do |i, times|
timetable[i] = []
if times[0] == '0000'
if times[0] == '0000' && times[1] == '0000'
timetable[i] << nil
else
timetable[i] << formatted_slot(open: times[0], close: times[1])
Expand Down
2 changes: 1 addition & 1 deletion spec/deliveries/couriers/mondial_relay_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
expect(collection_point.timetable[2]).to eq [OpenStruct.new(open: '09:30', close: '19:30')]
expect(collection_point.timetable[3]).to eq [OpenStruct.new(open: '09:30', close: '19:30')]
expect(collection_point.timetable[4]).to eq [OpenStruct.new(open: '09:30', close: '19:30')]
expect(collection_point.timetable[5]).to eq [OpenStruct.new(open: '09:30', close: '19:30')]
expect(collection_point.timetable[5]).to eq [OpenStruct.new(open: '00:00', close: '23:59')]
expect(collection_point.timetable[6]).to eq [OpenStruct.new(open: '09:30', close: '18:30')]
expect(collection_point.email).to eq nil
expect(collection_point.phone).to eq nil
Expand Down
4 changes: 2 additions & 2 deletions spec/deliveries/support/mondial_relay_stubs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def register_mondial_relay_get_collection_points_stubs
<string>0000</string>
</Horaires_Jeudi>
<Horaires_Vendredi>
<string>0930</string>
<string>1930</string>
<string>0000</string>
<string>2359</string>
<string>0000</string>
<string>0000</string>
</Horaires_Vendredi>
Expand Down

0 comments on commit aef8f04

Please sign in to comment.