Commit f12636bf authored by Fabio Papa's avatar Fabio Papa

Fix some code style issues

parent 3dc6717c
...@@ -56,10 +56,14 @@ describe 'Group show page' do ...@@ -56,10 +56,14 @@ describe 'Group show page' do
end end
context 'subgroup support' do context 'subgroup support' do
let(:restricted_group) { create(:group, let(:restricted_group) do
subgroup_creation_level: ::Gitlab::Access::OWNER_SUBGROUP_ACCESS) } create(:group, subgroup_creation_level: ::Gitlab::Access::OWNER_SUBGROUP_ACCESS)
let(:relaxed_group) { create(:group, end
subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS) }
let(:relaxed_group) do
create(:group, subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS)
end
let(:owner) { create(:user) } let(:owner) { create(:user) }
let(:maintainer) { create(:user) } let(:maintainer) { create(:user) }
......
...@@ -99,9 +99,9 @@ describe GroupPolicy do ...@@ -99,9 +99,9 @@ describe GroupPolicy do
let(:current_user) { maintainer } let(:current_user) { maintainer }
context 'with subgroup_creation level set to maintainer' do context 'with subgroup_creation level set to maintainer' do
let(:group) { create(:group, let(:group) do
:private, create(:group, :private, subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS)
subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS) } end
it 'allows every maintainer permission plus creating subgroups' do it 'allows every maintainer permission plus creating subgroups' do
allow(Group).to receive(:supports_nested_objects?).and_return(true) allow(Group).to receive(:supports_nested_objects?).and_return(true)
...@@ -207,10 +207,9 @@ describe GroupPolicy do ...@@ -207,10 +207,9 @@ describe GroupPolicy do
end end
describe 'private nested group use the highest access level from the group and inherited permissions', :nested_groups do describe 'private nested group use the highest access level from the group and inherited permissions', :nested_groups do
let(:nested_group) { create(:group, let(:nested_group) do
:private, create(:group, :private, :owner_subgroup_creation_only, parent: group)
:owner_subgroup_creation_only, end
parent: group) }
before do before do
nested_group.add_guest(guest) nested_group.add_guest(guest)
......
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