locale_spec.rb 500 B

123456789101112131415161718192021
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. require 'models/contexts/factory_context'
  4. RSpec.describe KnowledgeBase::Locale, type: :model do
  5. subject { create(:knowledge_base_locale) }
  6. include_context 'factory'
  7. describe 'destroying' do
  8. include_context 'basic Knowledge Base'
  9. it 'destroys locale' do
  10. published_answer # populate locale
  11. expect { primary_locale.destroy! }
  12. .not_to raise_error
  13. end
  14. end
  15. end