diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-07-29 11:49:46 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-07-29 11:49:46 +0200 |
commit | 7cefdb49eb460e87e3c3b827af32ae1b6834c4da (patch) | |
tree | b1ce1dcdb146e094d5929b0c385495239cd8e663 /features/steps/project/hooks.rb | |
parent | d30454e112378c24cc9edfd7b511ca42bdb1e399 (diff) | |
download | gitlab-ce-7cefdb49eb460e87e3c3b827af32ae1b6834c4da.tar.gz |
Prevent 500 if hook url is down, fixes #7376
Diffstat (limited to 'features/steps/project/hooks.rb')
-rw-r--r-- | features/steps/project/hooks.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb index 30da589260d..2bd383676e7 100644 --- a/features/steps/project/hooks.rb +++ b/features/steps/project/hooks.rb @@ -38,6 +38,11 @@ class ProjectHooks < Spinach::FeatureSteps click_link 'Test Hook' end + step 'I click test hook button with invalid URL' do + stub_request(:post, @hook.url).to_raise(SocketError) + click_link 'Test Hook' + end + step 'hook should be triggered' do page.current_path.should == project_hooks_path(current_project) page.should have_selector '.flash-notice', @@ -49,4 +54,11 @@ class ProjectHooks < Spinach::FeatureSteps text: 'Hook execution failed. '\ 'Ensure the project has commits.' end + + step 'I should see hook service down error message' do + page.should have_selector '.flash-alert', + text: 'Hook execution failed. '\ + 'Ensure hook URL is correct and '\ + 'service is up.' + end end |