translation_spec.rb 478 B

1234567891011121314
  1. require 'rails_helper'
  2. require 'models/contexts/factory_context'
  3. RSpec.describe KnowledgeBase::Category::Translation, type: :model do
  4. subject { create(:knowledge_base_category_translation) }
  5. include_context 'factory'
  6. it { is_expected.to validate_presence_of(:title) }
  7. it { is_expected.to validate_uniqueness_of(:kb_locale_id).scoped_to(:category_id).with_message(%r{}) }
  8. it { is_expected.to belong_to(:category) }
  9. it { is_expected.to belong_to(:kb_locale) }
  10. end