Commit b2eae552 authored by Douwe Maan's avatar Douwe Maan Committed by Bob Van Landuyt

Fix specs to expect new CE strings that haven't made it to EE yet

parent 7bb826fe
......@@ -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
......
......@@ -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 cloned without any authentication.
The project can be accessed without any authentication.
## List projects
......
......@@ -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 cloned without any authentication.'
expect(visibility_select_container).to have_content 'The project can be accessed 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 cloned without any authentication.'
expect(visibility_select_container).to have_content 'The project can be accessed without any authentication.'
end
end
end
......@@ -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 cloned without any authentication."
.to eq "The project can be accessed without any authentication."
end
end
......
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