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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
1ee4f986
Commit
1ee4f986
authored
Dec 30, 2016
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed spinach feature tests for the services and hooks controllers
Added a test for the integrations controller
parent
9f0d7945
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
8 deletions
+27
-8
app/views/projects/hooks/_project_hook.html.haml
app/views/projects/hooks/_project_hook.html.haml
+1
-1
app/views/shared/web_hooks/_form.html.haml
app/views/shared/web_hooks/_form.html.haml
+1
-2
features/steps/project/hooks.rb
features/steps/project/hooks.rb
+3
-3
features/steps/project/services.rb
features/steps/project/services.rb
+1
-1
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+1
-1
spec/controllers/projects/settings/integrations_controller_spec.rb
...rollers/projects/settings/integrations_controller_spec.rb
+20
-0
No files found.
app/views/projects/hooks/_project_hook.html.haml
View file @
1ee4f986
...
...
@@ -10,6 +10,6 @@
%span
.append-right-10.inline
SSL Verification:
#{
hook
.
enable_ssl_verification
?
"enabled"
:
"disabled"
}
=
link_to
"Test"
,
test_namespace_project_hook_path
(
@project
.
namespace
,
@project
,
hook
),
class:
"btn btn-sm"
=
link_to
namespace_project_
hook
_path
(
@project
.
namespace
,
@project
,
hook
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn btn-transparent"
do
=
link_to
namespace_project_
settings_integrations
_path
(
@project
.
namespace
,
@project
,
hook
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn btn-transparent"
do
%span
.sr-only
Remove
=
icon
(
'trash'
)
app/views/shared/web_hooks/_form.html.haml
View file @
1ee4f986
-
page_title
"Webhooks"
-
context_title
=
@project
?
'project'
:
'group'
.row.prepend-top-default
...
...
@@ -99,7 +98,7 @@
-
if
hooks
.
any?
%ul
.well-list
-
hooks
.
each
do
|
hook
|
=
render
"project_hook"
,
hook:
hook
=
render
"project
s/hooks/project
_hook"
,
hook:
hook
-
else
%p
.settings-message.text-center.append-bottom-0
No webhooks found, add one in the form above.
features/steps/project/hooks.rb
View file @
1ee4f986
...
...
@@ -36,12 +36,12 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
end
step
'I should see newly created hook'
do
expect
(
current_path
).
to
eq
namespace_project_
hook
s_path
(
current_project
.
namespace
,
current_project
)
expect
(
current_path
).
to
eq
namespace_project_
settings_integration
s_path
(
current_project
.
namespace
,
current_project
)
expect
(
page
).
to
have_content
(
@url
)
end
step
'I should see newly created hook with SSL verification enabled'
do
expect
(
current_path
).
to
eq
namespace_project_
hook
s_path
(
current_project
.
namespace
,
current_project
)
expect
(
current_path
).
to
eq
namespace_project_
settings_integration
s_path
(
current_project
.
namespace
,
current_project
)
expect
(
page
).
to
have_content
(
@url
)
expect
(
page
).
to
have_content
(
"SSL Verification: enabled"
)
end
...
...
@@ -57,7 +57,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
end
step
'hook should be triggered'
do
expect
(
current_path
).
to
eq
namespace_project_
hook
s_path
(
current_project
.
namespace
,
current_project
)
expect
(
current_path
).
to
eq
namespace_project_
settings_integration
s_path
(
current_project
.
namespace
,
current_project
)
expect
(
page
).
to
have_selector
'.flash-notice'
,
text:
'Hook executed successfully: HTTP 200'
end
...
...
features/steps/project/services.rb
View file @
1ee4f986
...
...
@@ -4,7 +4,7 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps
include
SharedPaths
step
'I visit project "Shop" services page'
do
visit
namespace_project_se
rvice
s_path
(
@project
.
namespace
,
@project
)
visit
namespace_project_se
ttings_integration
s_path
(
@project
.
namespace
,
@project
)
end
step
'I should see list of available services'
do
...
...
features/steps/shared/paths.rb
View file @
1ee4f986
...
...
@@ -256,7 +256,7 @@ module SharedPaths
end
step
'I visit project hooks page'
do
visit
namespace_project_
hook
s_path
(
@project
.
namespace
,
@project
)
visit
namespace_project_
settings_integration
s_path
(
@project
.
namespace
,
@project
)
end
step
'I visit project deploy keys page'
do
...
...
spec/controllers/projects/settings/integrations_controller_spec.rb
0 → 100644
View file @
1ee4f986
require
(
'spec_helper'
)
describe
Projects
::
Settings
::
IntegrationsController
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
project
.
team
<<
[
user
,
:master
]
sign_in
(
user
)
end
describe
'GET show'
do
it
'renders show with 200 status code'
do
get
:show
,
namespace_id:
project
.
namespace
,
project_id:
project
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
render_template
(
:show
)
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