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

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

Rails5 fix mysql milliseconds problem in specs

Closes #48977

See merge request gitlab-org/gitlab-ce!20464
parents 4bb26e7d fbb48bd7
---
title: Rails5 fix mysql milliseconds problem in specs
merge_request: 20464
author: Jasper Maes
type: fixed
......@@ -2461,7 +2461,9 @@ describe User do
it 'changes the namespace (just to compare to when username is not changed)' do
expect do
Timecop.freeze(1.second.from_now) do
user.update_attributes!(username: new_username)
end
end.to change { user.namespace.updated_at }
end
......
......@@ -100,7 +100,11 @@ describe Ci::RetryBuildService do
end
describe '#execute' do
let(:new_build) { service.execute(build) }
let(:new_build) do
Timecop.freeze(1.second.from_now) do
service.execute(build)
end
end
context 'when user has ability to execute build' do
before do
......@@ -150,7 +154,11 @@ describe Ci::RetryBuildService do
end
describe '#reprocess' do
let(:new_build) { service.reprocess!(build) }
let(:new_build) do
Timecop.freeze(1.second.from_now) do
service.reprocess!(build)
end
end
context 'when user has ability to execute build' do
before 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