summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-15 13:19:49 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-23 15:37:05 -0500
commit7c479d88a92233790bc0fb63146fe004f8b9b5d7 (patch)
tree3691c9e55229b145ea631bca724ba4da8c467d70 /spec/models
parent7e09a9b7dcef125af2e775869754a3327935b12d (diff)
downloadgitlab-ce-7c479d88a92233790bc0fb63146fe004f8b9b5d7.tar.gz
Pass fallback_diff_refs to Diff::File instead of using view helpers
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/diff_note_spec.rb4
-rw-r--r--spec/models/merge_request_spec.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/diff_note_spec.rb b/spec/models/diff_note_spec.rb
index ab4c51a87b0..96f075d4f7d 100644
--- a/spec/models/diff_note_spec.rb
+++ b/spec/models/diff_note_spec.rb
@@ -145,7 +145,7 @@ describe DiffNote, models: true do
context "when the merge request's diff refs don't match that of the diff note" do
before do
- allow(subject.noteable).to receive(:diff_sha_refs).and_return(commit.diff_refs)
+ allow(subject.noteable).to receive(:diff_refs).and_return(commit.diff_refs)
end
it "returns false" do
@@ -194,7 +194,7 @@ describe DiffNote, models: true do
context "when the note is outdated" do
before do
- allow(merge_request).to receive(:diff_sha_refs).and_return(commit.diff_refs)
+ allow(merge_request).to receive(:diff_refs).and_return(commit.diff_refs)
end
it "uses the DiffPositionUpdateService" do
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index 0e05f719499..6892f7bfc5f 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -1243,7 +1243,7 @@ describe MergeRequest, models: true do
end
end
- describe "#diff_sha_refs" do
+ describe "#diff_refs" do
context "with diffs" do
subject { create(:merge_request, :with_diffs) }
@@ -1252,7 +1252,7 @@ describe MergeRequest, models: true do
expect_any_instance_of(Repository).not_to receive(:commit)
- subject.diff_sha_refs
+ subject.diff_refs
end
it "returns expected diff_refs" do
@@ -1262,7 +1262,7 @@ describe MergeRequest, models: true do
head_sha: subject.merge_request_diff.head_commit_sha
)
- expect(subject.diff_sha_refs).to eq(expected_diff_refs)
+ expect(subject.diff_refs).to eq(expected_diff_refs)
end
end
end