summaryrefslogtreecommitdiff
path: root/spec/controllers/projects/commit_controller_spec.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-07-08 22:50:06 +0100
committerSean McGivern <sean@gitlab.com>2016-07-11 09:31:34 +0100
commit5266ae87c43a6760600e397257f9791d950dbe15 (patch)
tree83e840670b4c772020be590e5934586fe746df6e /spec/controllers/projects/commit_controller_spec.rb
parente462e122784f40550c53224af5a58b201ed1fd8f (diff)
downloadgitlab-ce-5266ae87c43a6760600e397257f9791d950dbe15.tar.gz
Support renames in diff_for_path actions
Diffstat (limited to 'spec/controllers/projects/commit_controller_spec.rb')
-rw-r--r--spec/controllers/projects/commit_controller_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb
index 472c4904919..3001d32e719 100644
--- a/spec/controllers/projects/commit_controller_spec.rb
+++ b/spec/controllers/projects/commit_controller_spec.rb
@@ -267,7 +267,7 @@ describe Projects::CommitController do
context 'when the user has access to the project' do
context 'when the path exists in the diff' do
it 'enables diff notes' do
- diff_for_path(id: commit.id, path: existing_path)
+ diff_for_path(id: commit.id, old_path: existing_path, new_path: existing_path)
expect(assigns(:diff_notes_disabled)).to be_falsey
expect(assigns(:comments_target)).to eq(noteable_type: 'Commit',
@@ -280,12 +280,12 @@ describe Projects::CommitController do
meth.call(diffs, diff_refs, project)
end
- diff_for_path(id: commit.id, path: existing_path)
+ diff_for_path(id: commit.id, 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(id: commit.id, path: existing_path.succ) }
+ before { diff_for_path(id: commit.id, old_path: existing_path.succ, new_path: existing_path.succ) }
it 'returns a 404' do
expect(response).to have_http_status(404)
@@ -296,7 +296,7 @@ describe Projects::CommitController do
context 'when the user does not have access to the project' do
before do
project.team.truncate
- diff_for_path(id: commit.id, path: existing_path)
+ diff_for_path(id: commit.id, old_path: existing_path, new_path: existing_path)
end
it 'returns a 404' do
@@ -306,7 +306,7 @@ describe Projects::CommitController do
end
context 'when the commit does not exist' do
- before { diff_for_path(id: commit.id.succ, path: existing_path) }
+ before { diff_for_path(id: commit.id.succ, old_path: existing_path, new_path: existing_path) }
it 'returns a 404' do
expect(response).to have_http_status(404)