diff options
author | Rémy Coutable <remy@rymai.me> | 2019-04-12 11:50:24 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-12 11:50:33 +0300 |
commit | 5f36bb928bf448a30436c978cf6dc7a85f98dbf2 (patch) | |
tree | 3fc32559d793d6798dbf7c00bbc2db9306bb2feb /spec/features/admin/admin_hooks_spec.rb | |
parent | f766f7afe4dd303854b7453734984b0ff8c8b3a7 (diff) |
Fix a few specs after updating capybara and selenium-webdriver
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/features/admin/admin_hooks_spec.rb')
-rw-r--r-- | spec/features/admin/admin_hooks_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/features/admin/admin_hooks_spec.rb b/spec/features/admin/admin_hooks_spec.rb index 25ed3bdc88e..ce780789f5a 100644 --- a/spec/features/admin/admin_hooks_spec.rb +++ b/spec/features/admin/admin_hooks_spec.rb @@ -73,22 +73,26 @@ describe 'Admin::Hooks' do end describe 'Remove existing hook', :js do + let(:hook_url) { generate(:url) } + before do - create(:system_hook) + create(:system_hook, url: hook_url) end context 'removes existing hook' do it 'from hooks list page' do visit admin_hooks_path - expect { accept_confirm { find(:link, 'Remove').send_keys(:return) } }.to change(SystemHook, :count).by(-1) + accept_confirm { click_link 'Remove' } + expect(page).not_to have_content(hook_url) end it 'from hook edit page' do visit admin_hooks_path click_link 'Edit' - expect { accept_confirm { find(:link, 'Remove').send_keys(:return) } }.to change(SystemHook, :count).by(-1) + accept_confirm { click_link 'Remove' } + expect(page).not_to have_content(hook_url) end end end |