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
0a1f4440
Commit
0a1f4440
authored
Aug 11, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails5: fix mysql milliseconds problem in project_spec
parent
23e63d66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
ee/changelogs/unreleased/rails5-mysql-milliseconds-project-spec.yml
...ogs/unreleased/rails5-mysql-milliseconds-project-spec.yml
+5
-0
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+5
-5
No files found.
ee/changelogs/unreleased/rails5-mysql-milliseconds-project-spec.yml
0 → 100644
View file @
0a1f4440
---
title
:
'
Rails5:
fix
mysql
milliseconds
problem
in
project_spec'
merge_request
:
6880
author
:
Jasper Maes
type
:
fixed
ee/spec/models/project_spec.rb
View file @
0a1f4440
...
...
@@ -60,7 +60,7 @@ describe Project do
project
.
save
end
.
to
change
{
ProjectImportState
.
count
}.
by
(
1
)
expect
(
project
.
import_state
.
next_execution_timestamp
).
to
eq
(
Time
.
now
)
expect
(
project
.
import_state
.
next_execution_timestamp
).
to
be_like_time
(
Time
.
now
)
end
end
end
...
...
@@ -75,7 +75,7 @@ describe Project do
project
.
update
(
mirror:
true
,
mirror_user_id:
project
.
creator
.
id
,
import_url:
generate
(
:url
))
end
.
to
change
{
ProjectImportState
.
count
}.
by
(
1
)
expect
(
project
.
import_state
.
next_execution_timestamp
).
to
eq
(
Time
.
now
)
expect
(
project
.
import_state
.
next_execution_timestamp
).
to
be_like_time
(
Time
.
now
)
end
end
end
...
...
@@ -89,7 +89,7 @@ describe Project do
project
.
update
(
mirror:
true
,
mirror_user_id:
project
.
creator
.
id
)
end
.
not_to
change
{
ProjectImportState
.
count
}
expect
(
project
.
import_state
.
next_execution_timestamp
).
to
eq
(
Time
.
now
)
expect
(
project
.
import_state
.
next_execution_timestamp
).
to
be_like_time
(
Time
.
now
)
end
end
end
...
...
@@ -377,7 +377,7 @@ describe Project do
describe
'#force_import_job!'
do
it
'sets next execution timestamp to now and schedules UpdateAllMirrorsWorker'
do
timestamp
=
Time
.
now
timestamp
=
1
.
second
.
from_now
.
change
(
usec:
0
)
project
=
create
(
:project
,
:mirror
)
expect
(
UpdateAllMirrorsWorker
).
to
receive
(
:perform_async
)
...
...
@@ -396,7 +396,7 @@ describe Project do
Timecop
.
freeze
(
timestamp
)
do
expect
{
project
.
force_import_job!
}.
to
change
(
project
.
import_state
,
:retry_count
).
to
(
0
)
expect
(
project
.
import_state
.
next_execution_timestamp
).
to
eq
(
timestamp
)
expect
(
project
.
import_state
.
next_execution_timestamp
).
to
be_like_time
(
timestamp
)
end
end
end
...
...
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