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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
a19508d6
Commit
a19508d6
authored
May 09, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test failures
parent
5bd32954
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
features/steps/project/hooks.rb
features/steps/project/hooks.rb
+1
-1
spec/models/hooks/web_hook_spec.rb
spec/models/hooks/web_hook_spec.rb
+2
-2
No files found.
features/steps/project/hooks.rb
View file @
a19508d6
...
@@ -59,7 +59,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
...
@@ -59,7 +59,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
step
'hook should be triggered'
do
step
'hook should be triggered'
do
expect
(
current_path
).
to
eq
namespace_project_hooks_path
(
current_project
.
namespace
,
current_project
)
expect
(
current_path
).
to
eq
namespace_project_hooks_path
(
current_project
.
namespace
,
current_project
)
expect
(
page
).
to
have_selector
'.flash-notice'
,
expect
(
page
).
to
have_selector
'.flash-notice'
,
text:
'Hook
successfully executed.
'
text:
'Hook
executed successfully: HTTP 200
'
end
end
step
'I should see hook error message'
do
step
'I should see hook error message'
do
...
...
spec/models/hooks/web_hook_spec.rb
View file @
a19508d6
...
@@ -95,13 +95,13 @@ describe WebHook, models: true do
...
@@ -95,13 +95,13 @@ describe WebHook, models: true do
it
"handles 200 status code"
do
it
"handles 200 status code"
do
WebMock
.
stub_request
(
:post
,
project_hook
.
url
).
to_return
(
status:
200
,
body:
"Success"
)
WebMock
.
stub_request
(
:post
,
project_hook
.
url
).
to_return
(
status:
200
,
body:
"Success"
)
expect
(
project_hook
.
execute
(
@data
,
'push_hooks'
)).
to
eq
([
true
,
'Success'
])
expect
(
project_hook
.
execute
(
@data
,
'push_hooks'
)).
to
eq
([
200
,
'Success'
])
end
end
it
"handles 2xx status codes"
do
it
"handles 2xx status codes"
do
WebMock
.
stub_request
(
:post
,
project_hook
.
url
).
to_return
(
status:
201
,
body:
"Success"
)
WebMock
.
stub_request
(
:post
,
project_hook
.
url
).
to_return
(
status:
201
,
body:
"Success"
)
expect
(
project_hook
.
execute
(
@data
,
'push_hooks'
)).
to
eq
([
true
,
'Success'
])
expect
(
project_hook
.
execute
(
@data
,
'push_hooks'
)).
to
eq
([
201
,
'Success'
])
end
end
end
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