summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2017-05-05 14:11:28 +0200
committerGabriel Mazetto <brodock@gmail.com>2017-05-12 23:26:48 +0100
commit2e97db051ca52d464382df0c84562fbc5e67b956 (patch)
treedb050f0bb9cb9edb9031d62509ab9ef4278fbccf /spec/models
parentf661980904f718440cc700b7d1f38ea8bf0e5480 (diff)
downloadgitlab-ce-2e97db051ca52d464382df0c84562fbc5e67b956.tar.gz
Make the new repository_update_events configurable in System Hooks UI
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/hooks/system_hook_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/hooks/system_hook_spec.rb b/spec/models/hooks/system_hook_spec.rb
index a9e3ac3b679..4340170888d 100644
--- a/spec/models/hooks/system_hook_spec.rb
+++ b/spec/models/hooks/system_hook_spec.rb
@@ -1,6 +1,19 @@
require "spec_helper"
describe SystemHook, models: true do
+ context 'default attributes' do
+ let(:system_hook) { build(:system_hook) }
+
+ it 'sets defined default parameters' do
+ attrs = {
+ push_events: false,
+ repository_update_events: true,
+ enable_ssl_verification: true
+ }
+ expect(system_hook).to have_attributes(attrs)
+ end
+ end
+
describe "execute" do
let(:system_hook) { create(:system_hook) }
let(:user) { create(:user) }