diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-06-27 18:25:25 +0200 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-06-27 18:49:22 +0200 |
commit | f0eaf225538b40db5d0b2a6110378b65a240eac8 (patch) | |
tree | eaec46d8a236b175640efb902a9807ce6ca0619c /spec/support/shared_examples/throttled_touch.rb | |
parent | 07de43a7e07cefcbb60e7ed84c684f478eae8b93 (diff) | |
download | gitlab-ce-f0eaf225538b40db5d0b2a6110378b65a240eac8.tar.gz |
Rails5 fix MySQL milliseconds problem in specs
Diffstat (limited to 'spec/support/shared_examples/throttled_touch.rb')
-rw-r--r-- | spec/support/shared_examples/throttled_touch.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/shared_examples/throttled_touch.rb b/spec/support/shared_examples/throttled_touch.rb index 4a25bb9b750..eba990d4037 100644 --- a/spec/support/shared_examples/throttled_touch.rb +++ b/spec/support/shared_examples/throttled_touch.rb @@ -3,7 +3,7 @@ shared_examples_for 'throttled touch' do it 'updates the updated_at timestamp' do Timecop.freeze do subject.touch - expect(subject.updated_at).to eq(Time.zone.now) + expect(subject.updated_at).to be_like_time(Time.zone.now) end end @@ -14,7 +14,7 @@ shared_examples_for 'throttled touch' do Timecop.freeze(first_updated_at) { subject.touch } Timecop.freeze(second_updated_at) { subject.touch } - expect(subject.updated_at).to eq(first_updated_at) + expect(subject.updated_at).to be_like_time(first_updated_at) end end end |