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
3b61451c
Commit
3b61451c
authored
May 27, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return 202 for destory. Remove []. Remove def pipeline_schedules from helper.
parent
63ca126e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
lib/api/pipeline_schedules.rb
lib/api/pipeline_schedules.rb
+2
-6
spec/requests/api/pipeline_schedules_spec.rb
spec/requests/api/pipeline_schedules_spec.rb
+1
-1
No files found.
lib/api/pipeline_schedules.rb
View file @
3b61451c
...
...
@@ -114,20 +114,16 @@ module API
not_found!
(
'PipelineSchedule'
)
unless
pipeline_schedule
status
:accepted
present
pipeline_schedule
.
destroy
,
with:
Entities
::
PipelineScheduleDetails
end
end
helpers
do
def
pipeline_schedules
@pipeline_schedules
||=
user_project
.
pipeline_schedules
.
preload
([
:owner
,
:last_pipeline
])
end
def
pipeline_schedule
@pipeline_schedule
||=
user_project
.
pipeline_schedules
.
preload
(
[
:owner
,
:last_pipeline
]
)
.
preload
(
:owner
,
:last_pipeline
)
.
find_by
(
id:
params
.
delete
(
:pipeline_schedule_id
))
end
end
...
...
spec/requests/api/pipeline_schedules_spec.rb
View file @
3b61451c
...
...
@@ -267,7 +267,7 @@ describe API::PipelineSchedules do
delete
api
(
"/projects/
#{
project
.
id
}
/pipeline_schedules/
#{
pipeline_schedule
.
id
}
"
,
master
)
end
.
to
change
{
project
.
pipeline_schedules
.
count
}.
by
(
-
1
)
expect
(
response
).
to
have_http_status
(
:
ok
)
expect
(
response
).
to
have_http_status
(
:
accepted
)
expect
(
response
).
to
match_response_schema
(
'pipeline_schedule'
)
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