diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-05-16 18:46:18 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-05-24 21:34:43 +0300 |
commit | bb8f2520b4254c9dabe377df48e29c5f17894a1d (patch) | |
tree | 59c0f074d6c662fd6243219e2cdfb205000e59f2 /spec/models/concerns | |
parent | ddc760a0d625706196629c061f9dfa1cd2d8402e (diff) |
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.
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/discussion_on_diff_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/concerns/discussion_on_diff_spec.rb b/spec/models/concerns/discussion_on_diff_spec.rb index 30572ce9332..8cd129dc851 100644 --- a/spec/models/concerns/discussion_on_diff_spec.rb +++ b/spec/models/concerns/discussion_on_diff_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe DiscussionOnDiff do - subject { create(:diff_note_on_merge_request).to_discussion } + subject { create(:diff_note_on_merge_request, line_number: 18).to_discussion } describe "#truncated_diff_lines" do let(:truncated_lines) { subject.truncated_diff_lines } |