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
6a88a222
Commit
6a88a222
authored
May 15, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update specs and and service with correct timezone
parent
87e5f74f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
app/services/resource_events/change_milestone_service.rb
app/services/resource_events/change_milestone_service.rb
+1
-1
spec/services/auth/container_registry_authentication_service_spec.rb
...es/auth/container_registry_authentication_service_spec.rb
+1
-1
spec/services/ci/register_job_service_spec.rb
spec/services/ci/register_job_service_spec.rb
+1
-1
spec/services/note_summary_spec.rb
spec/services/note_summary_spec.rb
+2
-2
spec/services/projects/alerting/notify_service_spec.rb
spec/services/projects/alerting/notify_service_spec.rb
+2
-2
No files found.
app/services/resource_events/change_milestone_service.rb
View file @
6a88a222
...
...
@@ -4,7 +4,7 @@ module ResourceEvents
class
ChangeMilestoneService
attr_reader
:resource
,
:user
,
:event_created_at
,
:milestone
,
:old_milestone
def
initialize
(
resource
,
user
,
created_at:
Time
.
now
,
old_milestone
:)
def
initialize
(
resource
,
user
,
created_at:
Time
.
current
,
old_milestone
:)
@resource
=
resource
@user
=
user
@event_created_at
=
created_at
...
...
spec/services/auth/container_registry_authentication_service_spec.rb
View file @
6a88a222
...
...
@@ -35,7 +35,7 @@ describe Auth::ContainerRegistryAuthenticationService do
it
{
expect
(
payload
).
to
include
(
'access'
)
}
context
'a expirable'
do
let
(
:expires_at
)
{
Time
.
at
(
payload
[
'exp'
])
}
let
(
:expires_at
)
{
Time
.
zone
.
at
(
payload
[
'exp'
])
}
let
(
:expire_delay
)
{
10
}
context
'for default configuration'
do
...
...
spec/services/ci/register_job_service_spec.rb
View file @
6a88a222
...
...
@@ -571,7 +571,7 @@ module Ci
end
describe
'#register_success'
do
let!
(
:current_time
)
{
Time
.
new
(
2018
,
4
,
5
,
14
,
0
,
0
)
}
let!
(
:current_time
)
{
Time
.
new
.
in_time_zone
(
2018
,
4
,
5
,
14
,
0
,
0
)
}
let!
(
:attempt_counter
)
{
double
(
'Gitlab::Metrics::NullMetric'
)
}
let!
(
:job_queue_duration_seconds
)
{
double
(
'Gitlab::Metrics::NullMetric'
)
}
...
...
spec/services/note_summary_spec.rb
View file @
6a88a222
...
...
@@ -30,13 +30,13 @@ describe NoteSummary do
end
context
'when noteable is a commit'
do
let
(
:noteable
)
{
build
(
:commit
,
system_note_timestamp:
Time
.
at
(
43
))
}
let
(
:noteable
)
{
build
(
:commit
,
system_note_timestamp:
Time
.
zone
.
at
(
43
))
}
it
'returns note hash specific to commit'
do
expect
(
create_note_summary
.
note
).
to
eq
(
noteable:
nil
,
project:
project
,
author:
user
,
note:
'note'
,
noteable_type:
'Commit'
,
commit_id:
noteable
.
id
,
created_at:
Time
.
at
(
43
)
created_at:
Time
.
zone
.
at
(
43
)
)
end
end
...
...
spec/services/projects/alerting/notify_service_spec.rb
View file @
6a88a222
...
...
@@ -121,7 +121,7 @@ describe Projects::Alerting::NotifyService do
expect
(
last_alert_attributes
).
to
match
(
project_id:
project
.
id
,
title:
payload_raw
.
fetch
(
:title
),
started_at:
Time
.
parse
(
payload_raw
.
fetch
(
:start_time
)),
started_at:
Time
.
zone
.
parse
(
payload_raw
.
fetch
(
:start_time
)),
severity:
payload_raw
.
fetch
(
:severity
),
status:
AlertManagement
::
Alert
::
STATUSES
[
:triggered
],
events:
1
,
...
...
@@ -154,7 +154,7 @@ describe Projects::Alerting::NotifyService do
expect
(
last_alert_attributes
).
to
match
(
project_id:
project
.
id
,
title:
payload_raw
.
fetch
(
:title
),
started_at:
Time
.
parse
(
payload_raw
.
fetch
(
:start_time
)),
started_at:
Time
.
zone
.
parse
(
payload_raw
.
fetch
(
:start_time
)),
severity:
'critical'
,
status:
AlertManagement
::
Alert
::
STATUSES
[
:triggered
],
events:
1
,
...
...
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