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
4304fcc1
Commit
4304fcc1
authored
Jan 06, 2021
by
Alex Buijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create onboarding_progress record when creating group
parent
7e3a1eb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
app/services/groups/create_service.rb
app/services/groups/create_service.rb
+1
-0
spec/services/groups/create_service_spec.rb
spec/services/groups/create_service_spec.rb
+8
-0
No files found.
app/services/groups/create_service.rb
View file @
4304fcc1
...
...
@@ -35,6 +35,7 @@ module Groups
@group
.
add_owner
(
current_user
)
@group
.
create_namespace_settings
Service
.
create_from_active_default_integrations
(
@group
,
:group_id
)
OnboardingProgress
.
onboard
(
@group
)
end
end
...
...
spec/services/groups/create_service_spec.rb
View file @
4304fcc1
...
...
@@ -63,6 +63,10 @@ RSpec.describe Groups::CreateService, '#execute' do
end
it
{
is_expected
.
to
be_persisted
}
it
'adds an onboarding progress record'
do
expect
{
subject
}.
to
change
(
OnboardingProgress
,
:count
).
from
(
0
).
to
(
1
)
end
end
context
'when user can not create a group'
do
...
...
@@ -84,6 +88,10 @@ RSpec.describe Groups::CreateService, '#execute' do
end
it
{
is_expected
.
to
be_persisted
}
it
'does not add an onboarding progress record'
do
expect
{
subject
}.
not_to
change
(
OnboardingProgress
,
:count
).
from
(
0
)
end
end
context
'as guest'
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