Commit d039d7f0 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Add additional specs to document current behaviour

Remove puts
parent b807307f
......@@ -38,6 +38,10 @@ RSpec.describe Gitlab::Auth::GroupSaml::SessionEnforcer do
it { is_expected.to be_falsey }
context 'with sub-group' do
before do
allow(group).to receive(:root_ancestor).and_return(root_group)
end
let(:group) { create(:group, parent: root_group) }
subject { described_class.new(user, group).access_restricted? }
......@@ -149,6 +153,18 @@ RSpec.describe Gitlab::Auth::GroupSaml::SessionEnforcer do
end
it { is_expected.to be_falsey }
context 'when group is a subgroup' do
before do
allow(group).to receive(:root_ancestor).and_return(root_group)
end
let(:group) { create(:group, parent: root_group) }
subject { described_class.new(user, group).access_restricted? }
it { is_expected.to be_truthy }
end
end
context 'with project bot' do
......
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