Merge branch 'rails5-fix-48977' into 'master'
Rails5 fix mysql milliseconds problem in specs Closes #48977 See merge request gitlab-org/gitlab-ce!20464
This commit is contained in:
commit
e2f7fbe439
3 changed files with 18 additions and 3 deletions
5
changelogs/unreleased/rails5-fix-48977.yml
Normal file
5
changelogs/unreleased/rails5-fix-48977.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
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
|
||||
user.update_attributes!(username: new_username)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue