trabajo-afectivo/spec/models/knowledge_base/translation_spec.rb

17 lines
555 B
Ruby
Raw Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
2019-06-04 03:40:48 +00:00
require 'rails_helper'
require 'models/contexts/factory_context'
RSpec.describe KnowledgeBase::Translation, type: :model do
subject { create(:knowledge_base).translations.first }
include_context 'factory'
it { is_expected.to validate_presence_of(:title) }
it { is_expected.to validate_uniqueness_of(:kb_locale_id).scoped_to(:knowledge_base_id).with_message(%r{}) }
2019-06-04 03:40:48 +00:00
it { is_expected.to belong_to(:knowledge_base) }
it { is_expected.to belong_to(:kb_locale) }
end