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
fe96a1f2
Commit
fe96a1f2
authored
Jan 12, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub multiple variable controller method
parent
2150ed40
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
app/controllers/projects/variables_controller.rb
app/controllers/projects/variables_controller.rb
+4
-0
config/routes/project.rb
config/routes/project.rb
+6
-1
spec/controllers/projects/variables_controller_spec.rb
spec/controllers/projects/variables_controller_spec.rb
+7
-0
No files found.
app/controllers/projects/variables_controller.rb
View file @
fe96a1f2
...
...
@@ -32,6 +32,10 @@ class Projects::VariablesController < Projects::ApplicationController
end
end
def
save_multiple
head
:ok
end
def
destroy
if
variable
.
destroy
redirect_to
project_settings_ci_cd_path
(
project
),
...
...
config/routes/project.rb
View file @
fe96a1f2
...
...
@@ -156,7 +156,12 @@ constraints(ProjectUrlConstrainer.new) do
end
end
resources
:variables
,
only:
[
:index
,
:show
,
:update
,
:create
,
:destroy
]
resources
:variables
,
only:
[
:index
,
:show
,
:update
,
:create
,
:destroy
]
do
collection
do
post
:save_multiple
end
end
resources
:triggers
,
only:
[
:index
,
:create
,
:edit
,
:update
,
:destroy
]
do
member
do
post
:take_ownership
...
...
spec/controllers/projects/variables_controller_spec.rb
View file @
fe96a1f2
...
...
@@ -55,4 +55,11 @@ describe Projects::VariablesController do
end
end
end
describe
'POST #save_multiple'
do
it
'returns a successful response'
do
post
:save_multiple
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
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