summaryrefslogtreecommitdiff
path: root/spec/models/user_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-05-16 20:29:21 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2018-05-16 20:29:21 +0000
commit60b14e52963238bb2401004350d963eda1fabef6 (patch)
tree4245a49a274608cae18039d87984570bad313e1f /spec/models/user_spec.rb
parentbd0a12be77840ca49cdd296e4a6d701df99024b4 (diff)
parent2060533f91b5527b568321f63a1aa7f4ef0081d5 (diff)
downloadgitlab-ce-60b14e52963238bb2401004350d963eda1fabef6.tar.gz
Merge branch 'jprovazn-remote-upload-destroy' into 'master'
Delete remote uploads Closes #45425 See merge request gitlab-org/gitlab-ce!18698
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index de15e0e62aa..8d3ddd1f87d 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -39,7 +39,7 @@ describe User do
it { is_expected.to have_many(:builds).dependent(:nullify) }
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(:uploads) }
it { is_expected.to have_many(:reported_abuse_reports).dependent(:destroy).class_name('AbuseReport') }
it { is_expected.to have_many(:custom_attributes).class_name('UserCustomAttribute') }
@@ -2809,4 +2809,12 @@ describe User do
expect { user.increment_failed_attempts! }.not_to change(user, :failed_attempts)
end
end
+
+ context 'with uploads' do
+ it_behaves_like 'model with mounted uploader', false do
+ let(:model_object) { create(:user, :with_avatar) }
+ let(:upload_attribute) { :avatar }
+ let(:uploader_class) { AttachmentUploader }
+ end
+ end
end