-
Notifications
You must be signed in to change notification settings - Fork 1
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
checkout all validation #5
base: master
Are you sure you want to change the base?
Conversation
fagnerrs
commented
Sep 7, 2017
- Updating login and self_tracking tests
- Updating check out all overlap validation
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.
Added some comments
.where("workdays.workdate = :workdate AND | ||
(workday_volunteers.volunteer_id = :volunteer_id) AND | ||
(workdays.id != :id) AND (:this_end_time > workday_volunteers.start_time) AND | ||
(workday_volunteers.end_time is null) ", |
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.
What's the reason for only checking if end_time is null? They could also overlap if end_time is not null.
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.
Here the idea is check the overlap in shifts that were not checked out yet. But sounds like I missed to check when there are start_time and end_time.
get :check_out_all, :check_out_all_form => { check_out_time: "6:00 AM" } | ||
assert_redirected_to self_tracking_index_path | ||
assert !session[:unupdated_message].empty? | ||
assert session[:unupdated_message].has_value?("End time is before start time.") |
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.
Should there be three of these messages?
) | ||
Timecop.freeze(target_date_time) do | ||
|
||
# Overlaps workday |
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.
On here, can you check the actual message text rather than just the message count? Want to make sure the right messages are showing up.