summaryrefslogtreecommitdiff
path: root/spec/presenters
diff options
context:
space:
mode:
authorJames Lopez <james@gitlab.com>2018-12-06 13:15:29 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-12-06 13:15:29 +0000
commit64c11f104ceffdb7699686445ddc16c894dbe0c5 (patch)
treed4331a41db06511c3f4daaa6ec853110f31b4260 /spec/presenters
parent39c769aee8af82cd755a4c666a22eb5d6bec808e (diff)
downloadgitlab-ce-64c11f104ceffdb7699686445ddc16c894dbe0c5.tar.gz
Resolve "Can add an existing group member into a group project with new permissions but permissions are not overridden"
Diffstat (limited to 'spec/presenters')
-rw-r--r--spec/presenters/group_member_presenter_spec.rb8
-rw-r--r--spec/presenters/project_member_presenter_spec.rb6
2 files changed, 14 insertions, 0 deletions
diff --git a/spec/presenters/group_member_presenter_spec.rb b/spec/presenters/group_member_presenter_spec.rb
index c00e41725d9..bb66523a83d 100644
--- a/spec/presenters/group_member_presenter_spec.rb
+++ b/spec/presenters/group_member_presenter_spec.rb
@@ -135,4 +135,12 @@ describe GroupMemberPresenter do
end
end
end
+
+ it_behaves_like '#valid_level_roles', :group do
+ let(:expected_roles) { { 'Developer' => 30, 'Maintainer' => 40, 'Owner' => 50, 'Reporter' => 20 } }
+
+ before do
+ entity.parent = group
+ end
+ end
end
diff --git a/spec/presenters/project_member_presenter_spec.rb b/spec/presenters/project_member_presenter_spec.rb
index 83db5c56cdf..73ef113a1c5 100644
--- a/spec/presenters/project_member_presenter_spec.rb
+++ b/spec/presenters/project_member_presenter_spec.rb
@@ -135,4 +135,10 @@ describe ProjectMemberPresenter do
end
end
end
+
+ it_behaves_like '#valid_level_roles', :project do
+ before do
+ entity.group = group
+ end
+ end
end