summaryrefslogtreecommitdiff
path: root/spec/models/diff_note_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-12-22 12:49:56 +0100
committerDouwe Maan <douwe@selenight.nl>2017-12-22 18:07:15 +0100
commit771bf9527ffd5fd8fe258381593f686d5d960a42 (patch)
treee15ff12e3419aa751e3d54e6af7823a88f7be930 /spec/models/diff_note_spec.rb
parent92e15071c13f65cf7250315f1a138284880b0074 (diff)
downloadgitlab-ce-771bf9527ffd5fd8fe258381593f686d5d960a42.tar.gz
Improve performance of DiffDiscussion#truncated_diff_lines and DiffNote#diff_line by removing expensive diff position calculation and comparison
Diffstat (limited to 'spec/models/diff_note_spec.rb')
-rw-r--r--spec/models/diff_note_spec.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/spec/models/diff_note_spec.rb b/spec/models/diff_note_spec.rb
index 4d0b3245a13..2705421e540 100644
--- a/spec/models/diff_note_spec.rb
+++ b/spec/models/diff_note_spec.rb
@@ -112,22 +112,6 @@ describe DiffNote do
end
end
- describe "#for_line?" do
- context "when provided the correct diff line" do
- it "returns true" do
- expect(subject.for_line?(subject.diff_line)).to be true
- end
- end
-
- context "when provided a different diff line" do
- it "returns false" do
- some_line = subject.diff_file.diff_lines.first
-
- expect(subject.for_line?(some_line)).to be false
- end
- end
- end
-
describe "#active?" do
context "when noteable is a commit" do
subject { build(:diff_note_on_commit, project: project, position: position) }