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
35e160e8
Commit
35e160e8
authored
Mar 27, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flaky spec by setting a fixed date
This addresses flakiness to do with daylight savings.
parent
9f962a44
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
ee/spec/services/incident_management/oncall_rotations/create_service_spec.rb
...cident_management/oncall_rotations/create_service_spec.rb
+6
-2
No files found.
ee/spec/services/incident_management/oncall_rotations/create_service_spec.rb
View file @
35e160e8
...
@@ -8,7 +8,9 @@ RSpec.describe IncidentManagement::OncallRotations::CreateService do
...
@@ -8,7 +8,9 @@ RSpec.describe IncidentManagement::OncallRotations::CreateService do
let_it_be
(
:user_with_permissions
)
{
create
(
:user
)
}
let_it_be
(
:user_with_permissions
)
{
create
(
:user
)
}
let_it_be
(
:user_without_permissions
)
{
create
(
:user
)
}
let_it_be
(
:user_without_permissions
)
{
create
(
:user
)
}
let_it_be
(
:current_user
)
{
user_with_permissions
}
let_it_be
(
:current_user
)
{
user_with_permissions
}
let_it_be
(
:starts_at
)
{
Time
.
current
.
change
(
usec:
0
)
}
let
(
:execution_time
)
{
DateTime
.
new
(
2021
,
3
,
1
,
4
,
5
,
6
)
}
let
(
:starts_at
)
{
DateTime
.
new
(
2021
,
3
,
1
)
}
let
(
:participants
)
do
let
(
:participants
)
do
[
[
...
@@ -40,7 +42,9 @@ RSpec.describe IncidentManagement::OncallRotations::CreateService do
...
@@ -40,7 +42,9 @@ RSpec.describe IncidentManagement::OncallRotations::CreateService do
end
end
end
end
subject
(
:execute
)
{
service
.
execute
}
subject
(
:execute
)
do
travel_to
(
execution_time
)
{
service
.
execute
}
end
context
'when the current_user is anonymous'
do
context
'when the current_user is anonymous'
do
let
(
:current_user
)
{
nil
}
let
(
:current_user
)
{
nil
}
...
...
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