diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-16 20:29:21 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-16 20:29:21 +0000 |
commit | 60b14e52963238bb2401004350d963eda1fabef6 (patch) | |
tree | 4245a49a274608cae18039d87984570bad313e1f /spec/models/user_spec.rb | |
parent | bd0a12be77840ca49cdd296e4a6d701df99024b4 (diff) | |
parent | 2060533f91b5527b568321f63a1aa7f4ef0081d5 (diff) | |
download | gitlab-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.rb | 10 |
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 |