Commit a5bd978a authored by Jasper Maes's avatar Jasper Maes

Rails5 fix Mysql comparison failure caused by milliseconds problem

parent 07de43a7
---
title: Rails5 fix Mysql comparison failure caused by milliseconds problem
merge_request: 20222
author: Jasper Maes
type: fixed
......@@ -534,11 +534,18 @@ describe Discussion, ResolvableDiscussion do
describe "#last_resolved_note" do
let(:current_user) { create(:user) }
let(:time) { Time.now.utc }
before do
first_note.resolve!(current_user)
third_note.resolve!(current_user)
second_note.resolve!(current_user)
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
......
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