Created
April 16, 2018 23:03
-
-
Save kevindjacobson/0e8348171a4f6fd18ddefd6c5ef582ab to your computer and use it in GitHub Desktop.
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
| diff --git a/app/models/admin_user.rb b/app/models/admin_user.rb | |
| index b941eba166..394bb73e0b 100644 | |
| --- a/app/models/admin_user.rb | |
| +++ b/app/models/admin_user.rb | |
| @@ -204,7 +204,7 @@ class AdminUser < ApplicationRecord | |
| joins(:memberships). | |
| where(auction_memberships: { status: IN_AUCTION_STATUSES }). | |
| where('start_at between ? and ?', start_at.beginning_of_week(:sunday), | |
| - start_at.end_of_week(:sunday)). | |
| + start_at.end_of_week(:saturday).end_of_day). | |
| count | |
| end | |
| diff --git a/spec/factories/auction_memberships.rb b/spec/factories/auction_memberships.rb | |
| index b10df08e13..ce76d03f54 100644 | |
| --- a/spec/factories/auction_memberships.rb | |
| +++ b/spec/factories/auction_memberships.rb | |
| @@ -8,7 +8,7 @@ FactoryBot.define do | |
| trait :active do | |
| status { AuctionMembership::CONFIRMED } | |
| - start_at { Time.current.beginning_of_week } | |
| + start_at { Time.current.beginning_of_week(:sunday) } | |
| after(:build) do |membership| | |
| membership.close_at ||= membership.start_at + 4.weeks | |
| end | |
| diff --git a/spec/lib/candidates/new/talent_advocate_finder_spec.rb b/spec/lib/candidates/new/talent_advocate_finder_spec.rb | |
| index fa967fc750..93329bea9b 100644 | |
| --- a/spec/lib/candidates/new/talent_advocate_finder_spec.rb | |
| +++ b/spec/lib/candidates/new/talent_advocate_finder_spec.rb | |
| @@ -11,6 +11,14 @@ describe Candidates::New::TalentAdvocateFinder do | |
| ) | |
| end | |
| + before do | |
| + Timecop.freeze('15-04-2018') | |
| + end | |
| + | |
| + after do | |
| + Timecop.return | |
| + end | |
| + | |
| describe '#talent_advocate_in_candidate_market' do | |
| it 'selects a random TA from the markets' do | |
| nyc_talent_advocate = admin_users(:nyc_ta) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment