0
0
Fork 0

Fix attachment not being re-downloaded even if file is not stored (#12125)

Change the behaviour of remotable concern. Previously, it would skip
downloading an attachment if the stored remote URL is identical to
the new one. Now it would not be skipped if the attachment is not
actually currently stored by Paperclip.
This commit is contained in:
Eugen Rochko 2019-10-09 07:10:46 +02:00 committed by GitHub
parent 538db85d3c
commit 354fdd317e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 18 deletions

View file

@ -126,8 +126,8 @@ RSpec.describe Account, type: :model do
end
it 'sets default avatar, header, avatar_remote_url, and header_remote_url' do
expect(account.avatar_remote_url).to eq ''
expect(account.header_remote_url).to eq ''
expect(account.avatar_remote_url).to eq 'https://remote.test/invalid_avatar'
expect(account.header_remote_url).to eq expectation.header_remote_url
expect(account.avatar_file_name).to eq nil
expect(account.header_file_name).to eq nil
end