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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b2eae552
Commit
b2eae552
authored
Jun 07, 2017
by
Douwe Maan
Committed by
Bob Van Landuyt
Jun 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs to expect new CE strings that haven't made it to EE yet
parent
7bb826fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
14 deletions
+10
-14
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+6
-10
doc/api/projects.md
doc/api/projects.md
+1
-1
spec/features/projects/settings/visibility_settings_spec.rb
spec/features/projects/settings/visibility_settings_spec.rb
+2
-2
spec/helpers/visibility_level_helper_spec.rb
spec/helpers/visibility_level_helper_spec.rb
+1
-1
No files found.
app/helpers/projects_helper.rb
View file @
b2eae552
...
...
@@ -141,15 +141,11 @@ module ProjectsHelper
if
@project
.
private?
level
=
@project
.
project_feature
.
send
(
field
)
disabled_option
=
ProjectFeature
::
ENABLED
highest_available_option
=
ProjectFeature
::
PRIVATE
if
level
==
disabled_option
options
.
delete
(
'Everyone with access'
)
highest_available_option
=
options
.
values
.
max
if
level
==
ProjectFeature
::
ENABLED
end
options
=
options_for_select
(
options
.
invert
,
selected:
highest_available_option
||
@project
.
project_feature
.
public_send
(
field
),
disabled:
disabled_option
)
options
=
options_for_select
(
options
,
selected:
highest_available_option
||
@project
.
project_feature
.
public_send
(
field
))
content_tag
(
:select
,
...
...
@@ -485,9 +481,9 @@ module ProjectsHelper
def
project_feature_options
{
ProjectFeature
::
DISABLED
=>
s_
(
'ProjectFeature|Disabled'
)
,
ProjectFeature
::
PRIVATE
=>
s_
(
'ProjectFeature|Only team members'
)
,
ProjectFeature
::
ENABLED
=>
s_
(
'ProjectFeature|Everyone with access'
)
s_
(
'ProjectFeature|Disabled'
)
=>
ProjectFeature
::
DISABLED
,
s_
(
'ProjectFeature|Only team members'
)
=>
ProjectFeature
::
PRIVATE
,
s_
(
'ProjectFeature|Everyone with access'
)
=>
ProjectFeature
::
ENABLED
}
end
...
...
doc/api/projects.md
View file @
b2eae552
...
...
@@ -14,7 +14,7 @@ Constants for project visibility levels are next:
The project can be cloned by any logged in user.
*
`public`
:
The project can be
clon
ed without any authentication.
The project can be
access
ed without any authentication.
## List projects
...
...
spec/features/projects/settings/visibility_settings_spec.rb
View file @
b2eae552
...
...
@@ -14,7 +14,7 @@ feature 'Visibility settings', feature: true, js: true do
visibility_select_container
=
find
(
'.js-visibility-select'
)
expect
(
visibility_select_container
.
find
(
'.visibility-select'
).
value
).
to
eq
project
.
visibility_level
.
to_s
expect
(
visibility_select_container
).
to
have_content
'The project can be
clon
ed without any authentication.'
expect
(
visibility_select_container
).
to
have_content
'The project can be
access
ed without any authentication.'
end
scenario
'project visibility description updates on change'
do
...
...
@@ -41,7 +41,7 @@ feature 'Visibility settings', feature: true, js: true do
expect
(
visibility_select_container
).
not_to
have_select
'.visibility-select'
expect
(
visibility_select_container
).
to
have_content
'Public'
expect
(
visibility_select_container
).
to
have_content
'The project can be
clon
ed without any authentication.'
expect
(
visibility_select_container
).
to
have_content
'The project can be
access
ed without any authentication.'
end
end
end
spec/helpers/visibility_level_helper_spec.rb
View file @
b2eae552
...
...
@@ -37,7 +37,7 @@ describe VisibilityLevelHelper do
it
"describes public projects"
do
expect
(
project_visibility_level_description
(
Gitlab
::
VisibilityLevel
::
PUBLIC
))
.
to
eq
"The project can be
clon
ed without any authentication."
.
to
eq
"The project can be
access
ed without any authentication."
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