diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-28 12:47:06 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-28 12:47:06 +0300 |
commit | 0a43b25c20010b3eb4c9ab8cef8712df99702fac (patch) | |
tree | a5a88ace827c2329b437070c7774d40c54d4a476 /spec/workers | |
parent | cfdd80ec10c669a6f6811aef02b0df233a709881 (diff) | |
parent | bb8f2520b4254c9dabe377df48e29c5f17894a1d (diff) |
Merge branch '45190-create-notes-diff-files' into 'master'
Persist and use truncated note diffs instead requesting Gitaly in a N+1 manner on MR page
Closes #45190
See merge request gitlab-org/gitlab-ce!18991
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/create_note_diff_file_worker_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/workers/create_note_diff_file_worker_spec.rb b/spec/workers/create_note_diff_file_worker_spec.rb new file mode 100644 index 00000000000..0ac946a1232 --- /dev/null +++ b/spec/workers/create_note_diff_file_worker_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +describe CreateNoteDiffFileWorker do + describe '#perform' do + let(:diff_note) { create(:diff_note_on_merge_request) } + + it 'creates diff file' do + diff_note.note_diff_file.destroy! + + expect_any_instance_of(DiffNote).to receive(:create_diff_file) + .and_call_original + + described_class.new.perform(diff_note.id) + end + end +end |