Skip to content

Conversation

@fagnerrs
Copy link
Collaborator

@fagnerrs fagnerrs commented Sep 7, 2017

  • Updating login and self_tracking tests
  • Updating check out all overlap validation

@fagnerrs fagnerrs requested a review from tescher September 7, 2017 01:19
Copy link
Owner

@tescher tescher left a 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) ",
Copy link
Owner

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.

Copy link
Collaborator Author

@fagnerrs fagnerrs Sep 13, 2017

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.")
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants