summaryrefslogtreecommitdiff
path: root/spec/gitlab_shell_spec.rb
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-08-20 14:44:05 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2018-09-07 15:37:44 +1000
commit1ff3561895f361b79f46a059880ea122e3500d08 (patch)
tree9ddb7dd123af25567870b89fbf9b4402950654d6 /spec/gitlab_shell_spec.rb
parentca93c218228cee959253a3d7ce53926e07654a45 (diff)
downloadgitlab-shell-1ff3561895f361b79f46a059880ea122e3500d08.tar.gz
GitlabAccessStatus needs HTTP response status code
Diffstat (limited to 'spec/gitlab_shell_spec.rb')
-rw-r--r--spec/gitlab_shell_spec.rb25
1 files changed, 14 insertions, 11 deletions
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb
index 22b21fd..24fe151 100644
--- a/spec/gitlab_shell_spec.rb
+++ b/spec/gitlab_shell_spec.rb
@@ -22,23 +22,26 @@ describe GitlabShell do
let(:git_config_options) { ['receive.MaxInputSize=10000'] }
- let(:gitaly_check_access) { GitAccessStatus.new(
- true,
- 'ok',
- gl_repository: gl_repository,
- gl_id: gl_id,
- gl_username: gl_username,
- git_config_options: git_config_options,
- gitaly: { 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default'} , 'address' => 'unix:gitaly.socket' },
- git_protocol: git_protocol
- )
- }
+ let(:gitaly_check_access) do
+ GitAccessStatus.new(
+ true,
+ HTTPCodes::HTTP_SUCCESS,
+ 'ok',
+ gl_repository: gl_repository,
+ gl_id: gl_id,
+ gl_username: gl_username,
+ git_config_options: git_config_options,
+ gitaly: { 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default'} , 'address' => 'unix:gitaly.socket' },
+ git_protocol: git_protocol
+ )
+ end
let(:api) do
double(GitlabNet).tap do |api|
allow(api).to receive(:discover).and_return({ 'name' => 'John Doe', 'username' => 'testuser' })
allow(api).to receive(:check_access).and_return(GitAccessStatus.new(
true,
+ HTTPCodes::HTTP_SUCCESS,
'ok',
gl_repository: gl_repository,
gl_id: gl_id,