summaryrefslogtreecommitdiff
path: root/spec/models/merge_request/diff_llm_summary_spec.rb
blob: a94adae9fa5f0f34125cc2557cf631d25058b40b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe ::MergeRequest::DiffLlmSummary, feature_category: :code_review_workflow do
  let_it_be_with_reload(:project) { create(:project, :repository) }

  subject(:merge_request_diff_llm_summary) { build(:merge_request_diff_llm_summary) }

  describe 'associations' do
    it { is_expected.to belong_to(:merge_request_diff) }
    it { is_expected.to belong_to(:user).optional }
    it { is_expected.to validate_presence_of(:content) }
    it { is_expected.to validate_length_of(:content).is_at_most(2056) }
    it { is_expected.to validate_presence_of(:provider) }
  end
end