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
b02012e8
Commit
b02012e8
authored
May 07, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
bc2b3171
bd73925b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
app/models/ci/pipeline_schedule.rb
app/models/ci/pipeline_schedule.rb
+3
-0
spec/models/ci/pipeline_schedule_spec.rb
spec/models/ci/pipeline_schedule_spec.rb
+9
-0
No files found.
app/models/ci/pipeline_schedule.rb
View file @
b02012e8
...
...
@@ -5,6 +5,7 @@ module Ci
extend
Gitlab
::
Ci
::
Model
include
Importable
include
IgnorableColumn
include
StripAttribute
ignore_column
:deleted_at
...
...
@@ -22,6 +23,8 @@ module Ci
before_save
:set_next_run_at
strip_attributes
:cron
scope
:active
,
->
{
where
(
active:
true
)
}
scope
:inactive
,
->
{
where
(
active:
false
)
}
...
...
spec/models/ci/pipeline_schedule_spec.rb
View file @
b02012e8
...
...
@@ -35,6 +35,15 @@ describe Ci::PipelineSchedule do
expect
(
pipeline_schedule
).
not_to
be_valid
end
end
context
'when cron contains trailing whitespaces'
do
it
'strips the attribute'
do
pipeline_schedule
=
build
(
:ci_pipeline_schedule
,
cron:
' 0 0 * * * '
)
expect
(
pipeline_schedule
).
to
be_valid
expect
(
pipeline_schedule
.
cron
).
to
eq
(
'0 0 * * *'
)
end
end
end
describe
'#set_next_run_at'
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