Commit cab51985 authored by Douwe Maan's avatar Douwe Maan

Update specs with new method signatures

parent 623dbc1f
...@@ -193,7 +193,7 @@ describe Gitlab::Checks::ChangeAccess, lib: true do ...@@ -193,7 +193,7 @@ describe Gitlab::Checks::ChangeAccess, lib: true do
white_listed.each do |file_path| white_listed.each do |file_path|
old_rev = 'be93687618e4b132087f430a4d8fc3a609c9b77c' old_rev = 'be93687618e4b132087f430a4d8fc3a609c9b77c'
old_rev = new_rev if new_rev old_rev = new_rev if new_rev
new_rev = project.repository.commit_file(user, file_path, "commit #{file_path}", "commit #{file_path}", "master", false) new_rev = project.repository.commit_file(user, file_path, "commit #{file_path}", message: "commit #{file_path}", branch_name: "master", update: false)
allow(project.repository).to receive(:new_commits).and_return( allow(project.repository).to receive(:new_commits).and_return(
project.repository.commits_between(old_rev, new_rev) project.repository.commits_between(old_rev, new_rev)
...@@ -216,7 +216,7 @@ describe Gitlab::Checks::ChangeAccess, lib: true do ...@@ -216,7 +216,7 @@ describe Gitlab::Checks::ChangeAccess, lib: true do
black_listed.each do |file_path| black_listed.each do |file_path|
old_rev = 'be93687618e4b132087f430a4d8fc3a609c9b77c' old_rev = 'be93687618e4b132087f430a4d8fc3a609c9b77c'
old_rev = new_rev if new_rev old_rev = new_rev if new_rev
new_rev = project.repository.commit_file(user, file_path, "commit #{file_path}", "commit #{file_path}", "master", false) new_rev = project.repository.commit_file(user, file_path, "commit #{file_path}", message: "commit #{file_path}", branch_name: "master", update: false)
allow(project.repository).to receive(:new_commits).and_return( allow(project.repository).to receive(:new_commits).and_return(
project.repository.commits_between(old_rev, new_rev) project.repository.commits_between(old_rev, new_rev)
......
...@@ -561,9 +561,9 @@ describe Gitlab::Elastic::SearchResults, lib: true do ...@@ -561,9 +561,9 @@ describe Gitlab::Elastic::SearchResults, lib: true do
user, user,
'test-file', 'test-file',
'search test', 'search test',
'search test', message: 'search test',
'master', branch_name: 'master',
false update: false
) )
project.repository.index_commits project.repository.index_commits
...@@ -594,9 +594,9 @@ describe Gitlab::Elastic::SearchResults, lib: true do ...@@ -594,9 +594,9 @@ describe Gitlab::Elastic::SearchResults, lib: true do
user, user,
'test-file', 'test-file',
'tesla', 'tesla',
'search test', message: 'search test',
'master', branch_name: 'master',
false update: false
) )
project.repository.index_blobs project.repository.index_blobs
......
...@@ -217,7 +217,7 @@ describe Gitlab::GitAccess, lib: true do ...@@ -217,7 +217,7 @@ describe Gitlab::GitAccess, lib: true do
def stub_git_hooks def stub_git_hooks
# Running the `pre-receive` hook is expensive, and not necessary for this test. # Running the `pre-receive` hook is expensive, and not necessary for this test.
allow_any_instance_of(GitHooksService).to receive(:execute).and_yield allow_any_instance_of(GitHooksService).to receive(:execute).and_yield(GitHooksService.new)
end end
def merge_into_protected_branch def merge_into_protected_branch
...@@ -225,7 +225,7 @@ describe Gitlab::GitAccess, lib: true do ...@@ -225,7 +225,7 @@ describe Gitlab::GitAccess, lib: true do
stub_git_hooks stub_git_hooks
project.repository.add_branch(user, unprotected_branch, 'feature') project.repository.add_branch(user, unprotected_branch, 'feature')
target_branch = project.repository.lookup('feature') target_branch = project.repository.lookup('feature')
source_branch = project.repository.commit_file(user, FFaker::InternetSE.login_user_name, FFaker::HipsterIpsum.paragraph, FFaker::HipsterIpsum.sentence, unprotected_branch, false) source_branch = project.repository.commit_file(user, FFaker::InternetSE.login_user_name, FFaker::HipsterIpsum.paragraph, message: FFaker::HipsterIpsum.sentence, branch_name: unprotected_branch, update: false)
rugged = project.repository.rugged rugged = project.repository.rugged
author = { email: "email@example.com", time: Time.now, name: "Example Git User" } author = { email: "email@example.com", time: Time.now, name: "Example Git User" }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment