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
c78adba6
Commit
c78adba6
authored
Feb 14, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor spec/factories/users.rb to allow EE to extend it
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
fe10964a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
spec/factories/users.rb
spec/factories/users.rb
+8
-3
No files found.
spec/factories/users.rb
View file @
c78adba6
...
...
@@ -73,11 +73,16 @@ FactoryBot.define do
end
after
(
:create
)
do
|
user
,
evaluator
|
user
.
identities
<<
create
(
:identity
,
identity_attrs
=
{
provider:
evaluator
.
provider
,
extern_uid:
evaluator
.
extern_uid
)
}
if
evaluator
.
respond_to?
(
:saml_provider
)
identity_attrs
[
:saml_provider
]
=
evaluator
.
saml_provider
end
user
.
identities
<<
create
(
:identity
,
identity_attrs
)
end
end
...
...
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