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
9af3003e
Commit
9af3003e
authored
Jul 08, 2020
by
Allison Browne
Committed by
Robert Speicher
Jul 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move PipelineSchedulesHelper files under `Ci::` namespace
PipelineSchedulesHelper -> ::Ci::PipelineSchedulesHelper
parent
e27a4b3c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
15 deletions
+39
-15
app/helpers/ci/pipeline_schedules_helper.rb
app/helpers/ci/pipeline_schedules_helper.rb
+15
-0
app/helpers/pipeline_schedules_helper.rb
app/helpers/pipeline_schedules_helper.rb
+0
-13
spec/features/projects/pipeline_schedules_spec.rb
spec/features/projects/pipeline_schedules_spec.rb
+0
-2
spec/helpers/ci/pipeline_schedules_helper_spec.rb
spec/helpers/ci/pipeline_schedules_helper_spec.rb
+24
-0
No files found.
app/helpers/ci/pipeline_schedules_helper.rb
0 → 100644
View file @
9af3003e
# frozen_string_literal: true
module
Ci
module
PipelineSchedulesHelper
def
timezone_data
ActiveSupport
::
TimeZone
.
all
.
map
do
|
timezone
|
{
name:
timezone
.
name
,
offset:
timezone
.
now
.
utc_offset
,
identifier:
timezone
.
tzinfo
.
identifier
}
end
end
end
end
app/helpers/pipeline_schedules_helper.rb
deleted
100644 → 0
View file @
e27a4b3c
# frozen_string_literal: true
module
PipelineSchedulesHelper
def
timezone_data
ActiveSupport
::
TimeZone
.
all
.
map
do
|
timezone
|
{
name:
timezone
.
name
,
offset:
timezone
.
now
.
utc_offset
,
identifier:
timezone
.
tzinfo
.
identifier
}
end
end
end
spec/features/projects/pipeline_schedules_spec.rb
View file @
9af3003e
...
...
@@ -3,8 +3,6 @@
require
'spec_helper'
RSpec
.
describe
'Pipeline Schedules'
,
:js
do
include
PipelineSchedulesHelper
let!
(
:project
)
{
create
(
:project
,
:repository
)
}
let!
(
:pipeline_schedule
)
{
create
(
:ci_pipeline_schedule
,
:nightly
,
project:
project
)
}
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
pipeline_schedule:
pipeline_schedule
)
}
...
...
spec/helpers/ci/pipeline_schedules_helper_spec.rb
0 → 100644
View file @
9af3003e
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Ci
::
PipelineSchedulesHelper
,
:aggregate_failures
do
describe
'#timezone_data'
do
subject
{
helper
.
timezone_data
}
it
'matches schema'
do
expect
(
subject
).
not_to
be_empty
subject
.
each_with_index
do
|
timzone_hash
,
i
|
expect
(
timzone_hash
.
keys
).
to
contain_exactly
(
:name
,
:offset
,
:identifier
),
"Failed at index
#{
i
}
"
end
end
it
'formats for display'
do
first_timezone
=
ActiveSupport
::
TimeZone
.
all
[
0
]
expect
(
subject
[
0
][
:name
]).
to
eq
(
first_timezone
.
name
)
expect
(
subject
[
0
][
:offset
]).
to
eq
(
first_timezone
.
now
.
utc_offset
)
expect
(
subject
[
0
][
:identifier
]).
to
eq
(
first_timezone
.
tzinfo
.
identifier
)
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