Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-07-14 06:42:16 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-07-29 12:50:39 +0300
commitf2df2966aabc601dd1d6a6f9e75ead84db8a2765 (patch)
tree541e68b69d76145ef55b04f6907ceaefe5a88b3d /spec/features/protected_branches_spec.rb
parentc647540c1010fd1e51bced1db90947aa00c83fa8 (diff)
Humanize protected branches' access levels at one location.
1. The model now contains this humanization data, which is the once source of truth. 2. Previously, this was being listed out in the dropdown component as well.
Diffstat (limited to 'spec/features/protected_branches_spec.rb')
-rw-r--r--spec/features/protected_branches_spec.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb
index 087e3677169..553d1c70461 100644
--- a/spec/features/protected_branches_spec.rb
+++ b/spec/features/protected_branches_spec.rb
@@ -83,11 +83,7 @@ feature 'Projected Branches', feature: true, js: true do
end
describe "access control" do
- [
- ['developers', 'Developers + Masters'],
- ['masters', 'Masters'],
- ['no_one', 'No one']
- ].each do |access_type_id, access_type_name|
+ ProtectedBranch::PushAccessLevel.human_access_levels.each do |(access_type_id, access_type_name)|
it "allows creating protected branches that #{access_type_name} can push to" do
visit namespace_project_protected_branches_path(project.namespace, project)
set_protected_branch_name('master')
@@ -120,10 +116,7 @@ feature 'Projected Branches', feature: true, js: true do
end
end
- [
- ['developers', 'Developers + Masters'],
- ['masters', 'Masters']
- ].each do |access_type_id, access_type_name|
+ ProtectedBranch::MergeAccessLevel.human_access_levels.each do |(access_type_id, access_type_name)|
it "allows creating protected branches that #{access_type_name} can merge to" do
visit namespace_project_protected_branches_path(project.namespace, project)
set_protected_branch_name('master')