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
ff99ac2c
Commit
ff99ac2c
authored
Jul 25, 2018
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use POST method for group webhook test action
parent
2a89ae02
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
config/routes/group.rb
config/routes/group.rb
+1
-1
ee/app/views/groups/hooks/_project_hook.html.haml
ee/app/views/groups/hooks/_project_hook.html.haml
+1
-1
ee/spec/features/groups/hooks/user_tests_hooks_spec.rb
ee/spec/features/groups/hooks/user_tests_hooks_spec.rb
+5
-5
ee/spec/routing/webhook_routes_spec.rb
ee/spec/routing/webhook_routes_spec.rb
+2
-2
No files found.
config/routes/group.rb
View file @
ff99ac2c
...
...
@@ -83,7 +83,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
resources
:hooks
,
only:
[
:index
,
:create
,
:destroy
],
constraints:
{
id:
/\d+/
}
do
member
do
ge
t
:test
pos
t
:test
end
end
...
...
ee/app/views/groups/hooks/_project_hook.html.haml
View file @
ff99ac2c
...
...
@@ -9,7 +9,7 @@
.col-md-4.col-lg-5.text-right-lg.prepend-top-5
%span
.append-right-10.inline
SSL Verification:
#{
hook
.
enable_ssl_verification
?
"enabled"
:
"disabled"
}
=
link_to
"Test"
,
test_group_hook_path
(
@group
,
hook
),
class:
"btn btn-sm"
=
link_to
"Test"
,
test_group_hook_path
(
@group
,
hook
),
class:
"btn btn-sm"
,
method: :post
=
link_to
group_hook_path
(
@group
,
hook
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn btn-transparent"
do
%span
.sr-only
Remove
=
icon
(
'trash'
)
ee/spec/features/groups/hooks/user_tests_hooks_spec.rb
View file @
ff99ac2c
require
"
spec
_helper"
require
"
rails
_helper"
describe
"User tests hooks"
do
set
(
:group
)
{
create
(
:group
)
}
set
(
:hook
)
{
create
(
:group_hook
,
group:
group
)
}
set
(
:user
)
{
create
(
:user
)
}
describe
"User tests hooks"
,
:js
do
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:hook
)
{
create
(
:group_hook
,
group:
group
)
}
let!
(
:user
)
{
create
(
:user
)
}
before
do
group
.
add_owner
(
user
)
...
...
ee/spec/routing/webhook_routes_spec.rb
View file @
ff99ac2c
...
...
@@ -7,7 +7,7 @@ describe "routes to the proper webhooks controller", type: :routing do
it
"routes the test action"
do
expect
(
ge
t:
polymorphic_path
([
project
.
namespace
.
becomes
(
Namespace
),
project
,
project_hook
],
action: :test
)
pos
t:
polymorphic_path
([
project
.
namespace
.
becomes
(
Namespace
),
project
,
project_hook
],
action: :test
)
).
to
route_to
(
controller:
'projects/hooks'
,
action:
'test'
,
namespace_id:
project
.
namespace
.
name
,
...
...
@@ -32,7 +32,7 @@ describe "routes to the proper webhooks controller", type: :routing do
it
"routes the test action"
do
expect
(
ge
t:
polymorphic_path
([
group
,
group_hook
],
action: :test
)
pos
t:
polymorphic_path
([
group
,
group_hook
],
action: :test
)
).
to
route_to
(
controller:
'groups/hooks'
,
action:
'test'
,
group_id:
group
.
name
,
...
...
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