Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d039d7f0
Commit
d039d7f0
authored
Oct 02, 2021
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add additional specs to document current behaviour
Remove puts
parent
b807307f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
ee/spec/lib/gitlab/auth/group_saml/session_enforcer_spec.rb
ee/spec/lib/gitlab/auth/group_saml/session_enforcer_spec.rb
+16
-0
No files found.
ee/spec/lib/gitlab/auth/group_saml/session_enforcer_spec.rb
View file @
d039d7f0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment