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
cd443adf
Commit
cd443adf
authored
Oct 05, 2021
by
Alejandro Guerrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved validation to context block
parent
2bf59444
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
ee/spec/models/saml_group_link_spec.rb
ee/spec/models/saml_group_link_spec.rb
+10
-8
No files found.
ee/spec/models/saml_group_link_spec.rb
View file @
cd443adf
...
...
@@ -21,6 +21,16 @@ RSpec.describe SamlGroupLink do
it
{
is_expected
.
to
validate_uniqueness_of
(
:saml_group_name
).
scoped_to
([
:group_id
])
}
end
context
'saml_group_name with whitespaces'
do
it
'saves group link name without whitespace'
do
saml_group_link
=
described_class
.
new
(
saml_group_name:
' group '
)
saml_group_link
.
valid?
expect
(
saml_group_link
.
saml_group_name
).
to
eq
(
'group'
)
end
end
end
describe
'.by_id_and_group_id'
do
...
...
@@ -51,14 +61,6 @@ RSpec.describe SamlGroupLink do
end
end
describe
'#saml_group_name'
do
it
'saves group link name with whitespace'
do
saml_group_link
=
described_class
.
new
(
saml_group_name:
' group '
)
saml_group_link
.
valid?
expect
(
saml_group_link
.
saml_group_name
).
to
eq
(
'group'
)
end
end
describe
'.by_saml_group_name'
do
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group_link
)
{
create
(
:saml_group_link
,
group:
group
)
}
...
...
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