Skip to content

Commit

Permalink
Fix percision failing test on CI
Browse files Browse the repository at this point in the history
The db configuration can effect the percision of timestamps. See this:
travisjeffery/timecop#146 . Works locally of
course because of local db setup, CI it failed, so this just truncates
at the millisecond.
  • Loading branch information
mcordell committed Sep 7, 2015
1 parent b5d1d4d commit 1ea0bf4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ module ActiveRecord
let(:opts) { {} }

before do
Timecop.freeze
# Truncate time because db can be setup with less time percision
Timecop.freeze(Time.now.change(usec: 0))
allow(LookupToken).to receive(:generate).and_return([token, encoded])
@returned = user.send_reset_password_instructions(opts)
user.reload
Expand Down

0 comments on commit 1ea0bf4

Please sign in to comment.