summaryrefslogtreecommitdiff
path: root/features/steps/project/hooks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'features/steps/project/hooks.rb')
-rw-r--r--features/steps/project/hooks.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb
index 04e3bf78ede..df4a23a3716 100644
--- a/features/steps/project/hooks.rb
+++ b/features/steps/project/hooks.rb
@@ -28,11 +28,24 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
expect { click_button "Add Web Hook" }.to change(ProjectHook, :count).by(1)
end
+ step 'I submit new hook with SSL verification enabled' do
+ @url = FFaker::Internet.uri("http")
+ fill_in "hook_url", with: @url
+ check "hook_enable_ssl_verification"
+ expect { click_button "Add Web Hook" }.to change(ProjectHook, :count).by(1)
+ end
+
step 'I should see newly created hook' do
expect(current_path).to eq namespace_project_hooks_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_hooks_path(current_project.namespace, current_project)
+ expect(page).to have_content(@url)
+ expect(page).to have_content("SSL Verification: enabled")
+ end
+
step 'I click test hook button' do
stub_request(:post, @hook.url).to_return(status: 200)
click_link 'Test Hook'