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
065d4453
Commit
065d4453
authored
May 07, 2018
by
Olivier Gonzalez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanly handle plural name for ghost user migration
parent
0eb74426
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/services/users/migrate_to_ghost_user_service.rb
app/services/users/migrate_to_ghost_user_service.rb
+2
-2
spec/support/services/migrate_to_ghost_user_service_shared_examples.rb
...services/migrate_to_ghost_user_service_shared_examples.rb
+1
-1
No files found.
app/services/users/migrate_to_ghost_user_service.rb
View file @
065d4453
...
...
@@ -49,7 +49,7 @@ module Users
migrate_merge_requests
migrate_notes
migrate_abuse_reports
migrate_award_emoji
s
migrate_award_emoji
end
def
migrate_issues
...
...
@@ -70,7 +70,7 @@ module Users
user
.
reported_abuse_reports
.
update_all
(
reporter_id:
ghost_user
.
id
)
end
def
migrate_award_emoji
s
def
migrate_award_emoji
user
.
award_emoji
.
update_all
(
user_id:
ghost_user
.
id
)
end
end
...
...
spec/support/services/migrate_to_ghost_user_service_shared_examples.rb
View file @
065d4453
...
...
@@ -86,7 +86,7 @@ shared_examples "migrating a deleted user's associated records to the ghost user
end
it
"blocks the user before
#{
record_class_name
}
migration begins"
do
expect
(
service
).
to
receive
(
"migrate_
#{
record_class_name
.
parameterize
(
'_'
)
}
s
"
.
to_sym
)
do
expect
(
service
).
to
receive
(
"migrate_
#{
record_class_name
.
parameterize
(
'_'
)
.
pluralize
}
"
.
to_sym
)
do
expect
(
user
.
reload
).
to
be_blocked
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