gitlab-org--gitlab-foss/spec/models/note_diff_file_spec.rb
Oswaldo Ferreira bb8f2520b4 Persist truncated note diffs on a new table
We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response.
With this change we solve this problem and simplify a lot fetching this piece of info.
2018-05-24 15:34:43 -03:00

11 lines
230 B
Ruby

require 'rails_helper'
describe NoteDiffFile do
describe 'associations' do
it { is_expected.to belong_to(:diff_note) }
end
describe 'validations' do
it { is_expected.to validate_presence_of(:diff_note) }
end
end