Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fbb48bd7
Commit
fbb48bd7
authored
Jul 07, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails5 fix mysql milliseconds problem in specs
parent
96eb6fd3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
changelogs/unreleased/rails5-fix-48977.yml
changelogs/unreleased/rails5-fix-48977.yml
+5
-0
spec/models/user_spec.rb
spec/models/user_spec.rb
+3
-1
spec/services/ci/retry_build_service_spec.rb
spec/services/ci/retry_build_service_spec.rb
+10
-2
No files found.
changelogs/unreleased/rails5-fix-48977.yml
0 → 100644
View file @
fbb48bd7
---
title
:
Rails5 fix mysql milliseconds problem in specs
merge_request
:
20464
author
:
Jasper Maes
type
:
fixed
spec/models/user_spec.rb
View file @
fbb48bd7
...
@@ -2461,7 +2461,9 @@ describe User do
...
@@ -2461,7 +2461,9 @@ describe User do
it
'changes the namespace (just to compare to when username is not changed)'
do
it
'changes the namespace (just to compare to when username is not changed)'
do
expect
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
.
to
change
{
user
.
namespace
.
updated_at
}
end
end
...
...
spec/services/ci/retry_build_service_spec.rb
View file @
fbb48bd7
...
@@ -100,7 +100,11 @@ describe Ci::RetryBuildService do
...
@@ -100,7 +100,11 @@ describe Ci::RetryBuildService do
end
end
describe
'#execute'
do
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
context
'when user has ability to execute build'
do
before
do
before
do
...
@@ -150,7 +154,11 @@ describe Ci::RetryBuildService do
...
@@ -150,7 +154,11 @@ describe Ci::RetryBuildService do
end
end
describe
'#reprocess'
do
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
context
'when user has ability to execute build'
do
before
do
before
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment