Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2017-04-05 10:57:46 +0300
committerTimothy Andrew <mail@timothyandrew.net>2017-04-06 16:28:59 +0300
commit97cbf7c223ec772e4747bab5083904d4053e2e63 (patch)
treee956aac6644a42485095939f3b11aaa59a40b5b5 /spec/services/users/destroy_service_spec.rb
parent72580f07af5a2c1e4df6bbc339ad804b5f5bb9ed (diff)
Move a user's notes to the ghost user
... when the user is destroyed.
Diffstat (limited to 'spec/services/users/destroy_service_spec.rb')
-rw-r--r--spec/services/users/destroy_service_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/services/users/destroy_service_spec.rb b/spec/services/users/destroy_service_spec.rb
index a5b69e6ddf4..3efa7c196dc 100644
--- a/spec/services/users/destroy_service_spec.rb
+++ b/spec/services/users/destroy_service_spec.rb
@@ -144,18 +144,24 @@ describe Users::DestroyService, services: true do
context 'migrating associated records to the ghost user' do
context 'issues' do
- include_examples "migrating a deleted user's associated records to the ghost user", Issue do
+ include_examples "migrating a deleted user's associated records to the ghost user", Issue, {} do
let(:created_record) { create(:issue, project: project, author: user) }
let(:assigned_record) { create(:issue, project: project, assignee: user) }
end
end
context 'merge requests' do
- include_examples "migrating a deleted user's associated records to the ghost user", MergeRequest do
+ include_examples "migrating a deleted user's associated records to the ghost user", MergeRequest, {} do
let(:created_record) { create(:merge_request, source_project: project, author: user, target_branch: "first") }
let(:assigned_record) { create(:merge_request, source_project: project, assignee: user, target_branch: 'second') }
end
end
+
+ context 'notes' do
+ include_examples "migrating a deleted user's associated records to the ghost user", Note, { skip_assignee_specs: true } do
+ let(:created_record) { create(:note, project: project, author: user) }
+ end
+ end
end
end
end