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-06 20:03:07 +0300
committerTimothy Andrew <mail@timothyandrew.net>2017-04-06 20:09:40 +0300
commit1c42505b026d922df50c59d5f9e85073b5f5345f (patch)
treeb94259c6aa9c4a6e2e24d00d91c4d548a7bd6953 /spec/models/user_spec.rb
parente152f3f3daf09b25e5a5952a0e62580b3ef96c50 (diff)
Implement review comments from @DouweM for !10467.
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.
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 6a787f6b0df..3f9c013ce37 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -36,6 +36,7 @@ describe User, models: true do
it { is_expected.to have_many(:pipelines).dependent(:nullify) }
it { is_expected.to have_many(:chat_names).dependent(:destroy) }
it { is_expected.to have_many(:uploads).dependent(:destroy) }
+ it { is_expected.to have_many(:reported_abuse_reports).dependent(:destroy).class_name('AbuseReport') }
describe "#abuse_report" do
let(:current_user) { create(:user) }