fix admin_hooks_spec

This commit is contained in:
Jose Ivan Vargas 2017-10-03 12:02:48 -05:00
parent 7a5c2d5eff
commit bea4b0a8df
1 changed files with 2 additions and 2 deletions

View File

@ -62,14 +62,14 @@ describe 'Admin::Hooks', :js do
it 'from hooks list page' do
visit admin_hooks_path
expect { click_link 'Remove' }.to change(SystemHook, :count).by(-1)
expect { accept_confirm { find(:link, 'Remove').send_keys(:return) } }.to change(SystemHook, :count).by(-1)
end
it 'from hook edit page' do
visit admin_hooks_path
click_link 'Edit'
expect { click_link 'Remove' }.to change(SystemHook, :count).by(-1)
expect { accept_confirm { find(:link, 'Remove').send_keys(:return) } }.to change(SystemHook, :count).by(-1)
end
end
end