translation_spec.rb 555 B

12345678910111213141516
  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::Category::Translation, type: :model do
  5. subject { create(:knowledge_base_category_translation) }
  6. include_context 'factory'
  7. it { is_expected.to validate_presence_of(:title) }
  8. it { is_expected.to validate_uniqueness_of(:kb_locale_id).scoped_to(:category_id).with_message(%r{}) }
  9. it { is_expected.to belong_to(:category) }
  10. it { is_expected.to belong_to(:kb_locale) }
  11. end