diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-07-14 09:12:16 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-07-29 15:20:39 +0530 |
commit | f2df2966aabc601dd1d6a6f9e75ead84db8a2765 (patch) | |
tree | 541e68b69d76145ef55b04f6907ceaefe5a88b3d /spec/features | |
parent | c647540c1010fd1e51bced1db90947aa00c83fa8 (diff) | |
download | gitlab-ce-f2df2966aabc601dd1d6a6f9e75ead84db8a2765.tar.gz |
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')
-rw-r--r-- | spec/features/protected_branches_spec.rb | 11 |
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') |