diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-03-13 10:57:05 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-03-20 11:30:24 -0300 |
commit | 53a59604964b2cff06b4e25401acae50b1f82d3e (patch) | |
tree | e22722ab521ae524c7f59e5a2ed3d806d2217087 /spec/models | |
parent | 74ebeebbcdbe5a996610fa02711f0563b4a774fa (diff) | |
download | gitlab-ce-53a59604964b2cff06b4e25401acae50b1f82d3e.tar.gz |
Implement multi-line suggestions filtering
Implements the filtering logic for
`suggestion:-x+y` syntax.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/diff_note_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/diff_note_spec.rb b/spec/models/diff_note_spec.rb index fda00a693f0..67e5f4f7e41 100644 --- a/spec/models/diff_note_spec.rb +++ b/spec/models/diff_note_spec.rb @@ -336,6 +336,16 @@ describe DiffNote do end end + describe '#banzai_render_context' do + let(:note) { create(:diff_note_on_merge_request) } + + it 'includes expected context' do + context = note.banzai_render_context(:note) + + expect(context).to include(suggestions_filter_enabled: true, noteable: note.noteable, project: note.project) + end + end + describe "image diff notes" do subject { build(:image_diff_note_on_merge_request, project: project, noteable: merge_request) } |