summaryrefslogtreecommitdiff
path: root/spec/features/admin/admin_hooks_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/admin/admin_hooks_spec.rb')
-rw-r--r--spec/features/admin/admin_hooks_spec.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/features/admin/admin_hooks_spec.rb b/spec/features/admin/admin_hooks_spec.rb
index dc5b0ae009e..e6630e40147 100644
--- a/spec/features/admin/admin_hooks_spec.rb
+++ b/spec/features/admin/admin_hooks_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Admin::Hooks' do
+RSpec.describe 'Admin::Hooks', feature_category: :integrations do
include Spec::Support::Helpers::ModalHelpers
let_it_be(:user) { create(:admin) }
@@ -58,10 +58,7 @@ RSpec.describe 'Admin::Hooks' do
describe 'Update existing hook' do
let(:new_url) { generate(:url) }
-
- before do
- create(:system_hook)
- end
+ let_it_be(:hook) { create(:system_hook) }
it 'updates existing hook' do
visit admin_hooks_path
@@ -71,9 +68,9 @@ RSpec.describe 'Admin::Hooks' do
check 'Enable SSL verification'
click_button 'Save changes'
- expect(page).to have_content 'SSL Verification: enabled'
- expect(page).to have_current_path(admin_hooks_path, ignore_query: true)
- expect(page).to have_content(new_url)
+ expect(page).to have_content('Enable SSL verification')
+ expect(page).to have_current_path(edit_admin_hook_path(hook), ignore_query: true)
+ expect(page).to have_content('Recent events')
end
end
@@ -145,7 +142,7 @@ RSpec.describe 'Admin::Hooks' do
visit admin_hooks_path
find('.hook-test-button.dropdown').click
- click_link 'Merge requests events'
+ click_link 'Merge request events'
expect(page).to have_content 'Hook executed successfully'
end