Commit 54692746 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rails5-fix-48432' into 'master'

Rails5 fix Mysql comparison failure caused by milliseconds problem

Closes #48432

See merge request gitlab-org/gitlab-ce!20222
parents 586045e2 a5bd978a
---
title: Rails5 fix Mysql comparison failure caused by milliseconds problem
merge_request: 20222
author: Jasper Maes
type: fixed
......@@ -534,12 +534,19 @@ describe Discussion, ResolvableDiscussion do
describe "#last_resolved_note" do
let(:current_user) { create(:user) }
let(:time) { Time.now.utc }
before do
Timecop.freeze(time - 1.second) do
first_note.resolve!(current_user)
end
Timecop.freeze(time) do
third_note.resolve!(current_user)
end
Timecop.freeze(time + 1.second) do
second_note.resolve!(current_user)
end
end
it "returns the last note that was resolved" do
expect(subject.last_resolved_note).to eq(second_note)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment