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
...
@@ -141,15 +141,11 @@ module ProjectsHelper
if
@project
.
private?
if
@project
.
private?
level
=
@project
.
project_feature
.
send
(
field
)
level
=
@project
.
project_feature
.
send
(
field
)
disabled_option
=
ProjectFeature
::
ENABLED
options
.
delete
(
'Everyone with access'
)
highest_available_option
=
ProjectFeature
::
PRIVATE
if
level
==
disabled_option
highest_available_option
=
options
.
values
.
max
if
level
==
ProjectFeature
::
ENABLED
end
end
options
=
options_for_select
(
options
=
options_for_select
(
options
,
selected:
highest_available_option
||
@project
.
project_feature
.
public_send
(
field
))
options
.
invert
,
selected:
highest_available_option
||
@project
.
project_feature
.
public_send
(
field
),
disabled:
disabled_option
)
content_tag
(
content_tag
(
:select
,
:select
,
...
@@ -485,9 +481,9 @@ module ProjectsHelper
...
@@ -485,9 +481,9 @@ module ProjectsHelper
def
project_feature_options
def
project_feature_options
{
{
ProjectFeature
::
DISABLED
=>
s_
(
'ProjectFeature|Disabled'
)
,
s_
(
'ProjectFeature|Disabled'
)
=>
ProjectFeature
::
DISABLED
,
ProjectFeature
::
PRIVATE
=>
s_
(
'ProjectFeature|Only team members'
)
,
s_
(
'ProjectFeature|Only team members'
)
=>
ProjectFeature
::
PRIVATE
,
ProjectFeature
::
ENABLED
=>
s_
(
'ProjectFeature|Everyone with access'
)
s_
(
'ProjectFeature|Everyone with access'
)
=>
ProjectFeature
::
ENABLED
}
}
end
end
...
...
doc/api/projects.md
View file @
b2eae552
...
@@ -14,7 +14,7 @@ Constants for project visibility levels are next:
...
@@ -14,7 +14,7 @@ Constants for project visibility levels are next:
The project can be cloned by any logged in user.
The project can be cloned by any logged in user.
*
`public`
:
*
`public`
:
The project can be
clon
ed without any authentication.
The project can be
access
ed without any authentication.
## List projects
## 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
...
@@ -14,7 +14,7 @@ feature 'Visibility settings', feature: true, js: true do
visibility_select_container
=
find
(
'.js-visibility-select'
)
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
.
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
end
scenario
'project visibility description updates on change'
do
scenario
'project visibility description updates on change'
do
...
@@ -41,7 +41,7 @@ feature 'Visibility settings', feature: true, js: true 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
).
not_to
have_select
'.visibility-select'
expect
(
visibility_select_container
).
to
have_content
'Public'
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
end
end
end
spec/helpers/visibility_level_helper_spec.rb
View file @
b2eae552
...
@@ -37,7 +37,7 @@ describe VisibilityLevelHelper do
...
@@ -37,7 +37,7 @@ describe VisibilityLevelHelper do
it
"describes public projects"
do
it
"describes public projects"
do
expect
(
project_visibility_level_description
(
Gitlab
::
VisibilityLevel
::
PUBLIC
))
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
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