summaryrefslogtreecommitdiff
path: root/spec/services/users/destroy_service_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade Rails to 5.1.6.1Jasper Maes2019-04-231-0/+4
| | | | Model.new.attributes now also returns encrypted attributes.
* Add frozen_string_literal to spec/servicesfrozen_string_literal_spec_servicesThong Kuah2019-04-121-0/+2
| | | | Probably useful as we often move these files to "new" files.
* [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-081-2/+2
| | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* Fix: Project deletion may not log audit events during user deletionValery Sizov2018-08-171-13/+26
|
* Replace 'Sidekiq::Testing.inline!' with 'perform_enqueued_jobs'blackst0ne2018-07-231-1/+1
| | | | | | | | | | `perform_enqueued_jobs` is a Sidekiq method. Using this method violates the Dependency inversion principle[0]. This commit replaces `perform_enqueued_jobs` with ActiveJob's abstract method `perform_enqueued_jobs` in specs. [0]: https://en.wikipedia.org/wiki/Dependency_inversion_principle
* Use expect_next_instance_of to replace expect_any_instance_ofunify-destroy_service_spec.rbLin Jen-Shin2018-06-211-2/+6
|
* Gitlab::Shell works on shard name, not pathZeger-Jan van de Weg2018-04-251-2/+2
| | | | | | | | | | | Direct disk access is done through Gitaly now, so the legacy path was deprecated. This path was used in Gitlab::Shell however. This required the refactoring in this commit. Added is the removal of direct path access on the project model, as that lookup wasn't needed anymore is most cases. Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
* Use hashed storage in the specs40744-hashed-storage-specsNick Thomas2018-02-071-2/+2
|
* Remove soft removals related codeYorick Peterse2018-01-081-1/+1
| | | | | | | | | | | | | | This removes all usage of soft removals except for the "pending delete" system implemented for projects. This in turn simplifies all the query plans of the models that used soft removals. Since we don't really use soft removals for anything useful there's no point in keeping it around. This _does_ mean that hard removals of issues (which only admins can do if I'm not mistaken) can influence the "iid" values, but that code is broken to begin with. More on this (and how to fix it) can be found in https://gitlab.com/gitlab-org/gitlab-ce/issues/31114. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
* Fix user membership destroy relationFrancisco Javier López2018-01-021-0/+17
|
* Make sure repository's removal work for legacy and hashed storages28283-uuid-storageGabriel Mazetto2017-08-221-2/+25
|
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-2/+2
|
* Ensure all project factories use `:repository` trait or `:empty_project`rs-empty_project-cleanupRobert Speicher2017-08-011-2/+2
|
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix hard-deleting users when they have authored issuesNick Thomas2017-06-021-1/+7
|
* [Multiple issue assignee] Fix a number of specsValery Sizov2017-05-051-1/+1
|
* Fix specsClement Ho2017-05-041-2/+2
|
* Hard delete users' associated records deleted from AbuseReportssh-add-option-to-hard-deleteStan Hu2017-04-161-0/+6
| | | | | | In the case of spammers, we really want a hard delete to avoid retaining spam. Closes #31021
* Implement review comments from @DouweM for !10467.28695-move-all-associated-records-to-ghost-userTimothy Andrew2017-04-061-68/+23
| | | | | | | | | | 1. Have `MigrateToGhostUser` be a service rather than a mixed-in module, to keep things explicit. Specs testing the behavior of this class are moved into a separate service spec file. 2. Add a `user.reported_abuse_reports` association to make the `migrate_abuse_reports` method more consistent with the other `migrate_` methods.
* Move a user's award emoji to the ghost userTimothy Andrew2017-04-061-1/+29
| | | | | | | | | | | | | | | | ... when the user is destroyed. 1. Normally, for a given awardable and award emoji name, a user is only allowed to create a single award emoji. 2. This validation needs to be removed for ghost users, since: - User A and User B have created award emoji - with the same name and against the same awardable - User A is deleted. Their award emoji is moved to the ghost user - User B is deleted. Their award emoji needs to be moved to the ghost user. However, this breaks the uniqueness validation, since the ghost user is only allowed to have one award emoji of a given name for a given awardable
* Move a user's abuse reports to the ghost userTimothy Andrew2017-04-061-0/+7
| | | | | | ... when the user is destroyed. To clarify, this regards abuse reports that the to-be-deleted user has _reported_.
* Move a user's notes to the ghost userTimothy Andrew2017-04-061-2/+8
| | | | ... when the user is destroyed.
* Move a user's merge requests to the ghost user.Timothy Andrew2017-04-061-0/+161
1. When the user is deleted. 2. Refactor out code relating to "migrating records to the ghost user" into a `MigrateToGhostUser` concern, which is tested using a shared example.