Commit 9fdcbcb0 authored by Lin Jen-Shin's avatar Lin Jen-Shin

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
......@@ -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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment