checkout all validation#5
Open
fagnerrs wants to merge 1 commit intotescher:masterfrom
fagnerrs:devcheckoutall
Open
checkout all validation#5fagnerrs wants to merge 1 commit intotescher:masterfrom fagnerrs:devcheckoutall
fagnerrs wants to merge 1 commit intotescher:masterfrom
fagnerrs:devcheckoutall
Conversation
Collaborator
fagnerrs
commented
Sep 7, 2017
- Updating login and self_tracking tests
- Updating check out all overlap validation
tescher
reviewed
Sep 12, 2017
| .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) ", |
Owner
There was a problem hiding this comment.
What's the reason for only checking if end_time is null? They could also overlap if end_time is not null.
Collaborator
Author
There was a problem hiding this comment.
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.") |
Owner
There was a problem hiding this comment.
Should there be three of these messages?
| ) | ||
| Timecop.freeze(target_date_time) do | ||
|
|
||
| # Overlaps workday |
Owner
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.