-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix crash on missing headway_secs #182
Conversation
lib/realtime/vehicle.ex
Outdated
) do | ||
nil -> nil | ||
expected_seconds -> Headway.current_headway_spacing(expected_seconds, headway_secs) | ||
case headway_secs do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is just an either or would if-else be more appropriate/ readable?
Also, seems like this is worth a test case to make sure this is always covered. |
Codecov Report
@@ Coverage Diff @@
## master #182 +/- ##
=========================================
+ Coverage 95.79% 95.8% +<.01%
=========================================
Files 114 114
Lines 2404 2405 +1
Branches 244 244
=========================================
+ Hits 2303 2304 +1
Misses 99 99
Partials 2 2
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #182 +/- ##
=========================================
+ Coverage 95.79% 95.8% +<.01%
=========================================
Files 114 114
Lines 2404 2405 +1
Branches 244 244
=========================================
+ Hits 2303 2304 +1
Misses 99 99
Partials 2 2
Continue to review full report at Codecov.
|
Ready for another look |
Oops. #179 undid handling of a different
nil
.