delete_spec.rb 541 B

123456789101112131415161718192021
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Admin Panel > Knowledge Base > Delete', type: :system do
  4. include_context 'basic Knowledge Base'
  5. before do
  6. knowledge_base
  7. visit '/#manage/knowledge_base'
  8. find('a', text: 'Delete').click
  9. end
  10. it 'deletes the knowledge base' do
  11. find('input[name="title"]').fill_in with: knowledge_base.translations.first.title
  12. click_on 'Delete Knowledge Base'
  13. expect(KnowledgeBase.count).to be_zero
  14. end
  15. end