Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
a527fab1
Commit
a527fab1
authored
Dec 01, 2016
by
Andrew Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test all values for `enabled_git_access_protocol`
parent
532f8cbd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
spec/models/user_spec.rb
spec/models/user_spec.rb
+14
-9
No files found.
spec/models/user_spec.rb
View file @
a527fab1
...
@@ -576,15 +576,20 @@ describe User, models: true do
...
@@ -576,15 +576,20 @@ describe User, models: true do
end
end
end
end
context
'when current_application_settings.enabled_git_access_protocol does not contain SSH'
do
describe
'#require_ssh_key?'
do
before
do
protocol_and_expectation
=
{
stub_application_setting
(
enabled_git_access_protocol:
'HTTP'
)
'http'
=>
false
,
end
'ssh'
=>
true
,
''
=>
true
,
it
"doesn't require user to have SSH key"
do
}
protocol_and_expectation
.
each
do
|
protocol
,
expected
|
it
"has correct require_ssh_key?"
do
stub_application_setting
(
enabled_git_access_protocol:
protocol
)
user
=
build
(
:user
)
user
=
build
(
:user
)
expect
(
user
.
require_ssh_key?
).
to
be_falsey
expect
(
user
.
require_ssh_key?
).
to
eq
(
expected
)
end
end
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment