Skip to content

Instantly share code, notes, and snippets.

View kevindjacobson's full-sized avatar
🐈
I have four cats!

Kevin Jacobson kevindjacobson

🐈
I have four cats!
  • San Francisco, CA
View GitHub Profile
Creating network "hubot_default" with the default driver
Pulling redis (redis:latest)...
latest: Pulling from library/redis
Digest: sha256:6b9f935e89af002225c0dcdadf1fd74245b4cc1e3e91222f7e4769c236cf80d4
Status: Downloaded newer image for redis:latest
Pulling postgres (postgres:9.5)...
9.5: Pulling from library/postgres
Digest: sha256:888b62ebb1265a7df59258fa22227e707faa2b39d9abfe2a1d6f9e3cd5936468
Status: Downloaded newer image for postgres:9.5
Creating hubot_postgres_1 ...
Starting hubot_redis_1 ...
Starting hubot_postgres_1 ...
 Starting hubot_redis_1 ... done  Starting hubot_postgres_1 ... done yarn run v1.5.1
$ mocha -R spec
module.js:478
throw err;
^
Error: Cannot find module 'app-module-path'
at Function.Module._resolveFilename (module.js:476:15)
Arguments:
/usr/local/bin/node /opt/yarn-v1.5.1/bin/yarn.js test
PATH:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Yarn version:
1.5.1
Node version:
Starting hubot_postgres_1 ...
Starting hubot_redis_1 ...
 Starting hubot_postgres_1 ... done  Starting hubot_redis_1 ... done yarn run v1.5.1
$ mocha -R spec
module.js:478
throw err;
^
Error: Cannot find module 'app-module-path'
at Function.Module._resolveFilename (module.js:476:15)
latest: Pulling from library/redis
Digest: sha256:6b9f935e89af002225c0dcdadf1fd74245b4cc1e3e91222f7e4769c236cf80d4
Status: Image is up to date for redis:latest
9.5: Pulling from library/postgres
Digest: sha256:888b62ebb1265a7df59258fa22227e707faa2b39d9abfe2a1d6f9e3cd5936468
Status: Image is up to date for postgres:9.5
yarn run v1.5.1
warning package.json: "dependencies" has dependency "coffee-script" with range "^1.10.0" that collides with a dependency in "devDependencies" of the same name with version "^1.7.0"
$ mocha -R spec
module.js:478
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) }
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).
diff --git a/spec/lib/candidates/new/talent_advocate_finder_spec.rb b/spec/lib/candidates/new/talent_advocate_finder_spec.rb
index fa967fc750..61b5077fb6 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 07:00:01')
diff --git a/spec/lib/candidates/new/talent_advocate_finder_spec.rb b/spec/lib/candidates/new/talent_advocate_finder_spec.rb
index fa967fc750..b90ed0f874 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(DateTime.parse('15-04-2018').utc + 1.second)
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')