BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9fdcbcb0
Commit
9fdcbcb0
authored
Aug 12, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have trait all_events_enabled so that's easier to reuse, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13823349
parent
d5264e88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
project_hooks.rb
spec/factories/project_hooks.rb
+12
-0
project_hooks_spec.rb
spec/requests/api/project_hooks_spec.rb
+3
-4
No files found.
spec/factories/project_hooks.rb
View file @
9fdcbcb0
...
...
@@ -5,5 +5,17 @@ FactoryGirl.define do
trait
:token
do
token
{
SecureRandom
.
hex
(
10
)
}
end
trait
:all_events_enabled
do
%w[push_events
merge_requests_events
tag_push_events
issues_events
note_events
build_events
pipeline_events]
.
each
do
|
event
|
send
(
event
,
true
)
end
end
end
end
spec/requests/api/project_hooks_spec.rb
View file @
9fdcbcb0
...
...
@@ -7,10 +7,9 @@ describe API::API, 'ProjectHooks', api: true do
let!
(
:project
)
{
create
(
:project
,
creator_id:
user
.
id
,
namespace:
user
.
namespace
)
}
let!
(
:hook
)
do
create
(
:project_hook
,
project:
project
,
url:
"http://example.com"
,
push_events:
true
,
merge_requests_events:
true
,
tag_push_events:
true
,
issues_events:
true
,
note_events:
true
,
build_events:
true
,
pipeline_events:
true
,
:all_events_enabled
,
project:
project
,
url:
'http://example.com'
,
enable_ssl_verification:
true
)
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