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

15 lines
488 B
Ruby
Raw Normal View History

2019-06-04 03:40:48 +00:00
require 'rails_helper'
require 'models/contexts/factory_context'
RSpec.describe KnowledgeBase::Answer::Translation, type: :model, current_user_id: 1 do
2019-06-04 03:40:48 +00:00
subject { create(:knowledge_base_answer_translation) }
include_context 'factory'
it { is_expected.to validate_presence_of(:title) }
it { is_expected.to validate_uniqueness_of(:kb_locale_id).scoped_to(:answer_id).with_message(//) }
it { is_expected.to belong_to(:answer) }
it { is_expected.to belong_to(:kb_locale) }
end