Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-07-09 00:50:06 +0300
committerSean McGivern <sean@gitlab.com>2016-07-11 11:31:34 +0300
commit5266ae87c43a6760600e397257f9791d950dbe15 (patch)
tree83e840670b4c772020be590e5934586fe746df6e /spec/controllers/projects/compare_controller_spec.rb
parente462e122784f40550c53224af5a58b201ed1fd8f (diff)
Support renames in diff_for_path actions
Diffstat (limited to 'spec/controllers/projects/compare_controller_spec.rb')
-rw-r--r--spec/controllers/projects/compare_controller_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/projects/compare_controller_spec.rb b/spec/controllers/projects/compare_controller_spec.rb
index 1dd144a7b72..4058d5e2453 100644
--- a/spec/controllers/projects/compare_controller_spec.rb
+++ b/spec/controllers/projects/compare_controller_spec.rb
@@ -81,7 +81,7 @@ describe Projects::CompareController do
context 'when the user has access to the project' do
context 'when the path exists in the diff' do
it 'disables diff notes' do
- diff_for_path(from: ref_from, to: ref_to, path: existing_path)
+ diff_for_path(from: ref_from, to: ref_to, old_path: existing_path, new_path: existing_path)
expect(assigns(:diff_notes_disabled)).to be_truthy
end
@@ -92,12 +92,12 @@ describe Projects::CompareController do
meth.call(diffs, diff_refs, project)
end
- diff_for_path(from: ref_from, to: ref_to, path: existing_path)
+ diff_for_path(from: ref_from, to: ref_to, old_path: existing_path, new_path: existing_path)
end
end
context 'when the path does not exist in the diff' do
- before { diff_for_path(from: ref_from, to: ref_to, path: existing_path.succ) }
+ before { diff_for_path(from: ref_from, to: ref_to, old_path: existing_path.succ, new_path: existing_path.succ) }
it 'returns a 404' do
expect(response).to have_http_status(404)
@@ -108,7 +108,7 @@ describe Projects::CompareController do
context 'when the user does not have access to the project' do
before do
project.team.truncate
- diff_for_path(from: ref_from, to: ref_to, path: existing_path)
+ diff_for_path(from: ref_from, to: ref_to, old_path: existing_path, new_path: existing_path)
end
it 'returns a 404' do
@@ -118,7 +118,7 @@ describe Projects::CompareController do
end
context 'when the from ref does not exist' do
- before { diff_for_path(from: ref_from.succ, to: ref_to, path: existing_path) }
+ before { diff_for_path(from: ref_from.succ, to: ref_to, old_path: existing_path, new_path: existing_path) }
it 'returns a 404' do
expect(response).to have_http_status(404)
@@ -126,7 +126,7 @@ describe Projects::CompareController do
end
context 'when the to ref does not exist' do
- before { diff_for_path(from: ref_from, to: ref_to.succ, path: existing_path) }
+ before { diff_for_path(from: ref_from, to: ref_to.succ, old_path: existing_path, new_path: existing_path) }
it 'returns a 404' do
expect(response).to have_http_status(404)