diff --git a/spec/models/media_attachment_spec.rb b/spec/models/media_attachment_spec.rb index 1b9a13c38c..03e013e33a 100644 --- a/spec/models/media_attachment_spec.rb +++ b/spec/models/media_attachment_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe MediaAttachment, :paperclip_processing do +RSpec.describe MediaAttachment, :attachment_processing do describe 'local?' do subject { media_attachment.local? } diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index d8eb561d42..56c1cd364e 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -112,7 +112,7 @@ RSpec.configure do |config| end config.before do |example| - unless example.metadata[:paperclip_processing] + unless example.metadata[:attachment_processing] allow_any_instance_of(Paperclip::Attachment).to receive(:post_process).and_return(true) # rubocop:disable RSpec/AnyInstance end end diff --git a/spec/requests/api/v1/media_spec.rb b/spec/requests/api/v1/media_spec.rb index 26c76b9c5b..c89c49afdf 100644 --- a/spec/requests/api/v1/media_spec.rb +++ b/spec/requests/api/v1/media_spec.rb @@ -121,19 +121,19 @@ RSpec.describe 'Media' do end end - context 'with image/jpeg', :paperclip_processing do + context 'with image/jpeg', :attachment_processing do let(:params) { { file: fixture_file_upload('attachment.jpg', 'image/jpeg'), description: 'jpeg image' } } it_behaves_like 'a successful media upload', 'image' end - context 'with image/gif', :paperclip_processing do + context 'with image/gif', :attachment_processing do let(:params) { { file: fixture_file_upload('attachment.gif', 'image/gif') } } it_behaves_like 'a successful media upload', 'image' end - context 'with video/webm', :paperclip_processing do + context 'with video/webm', :attachment_processing do let(:params) { { file: fixture_file_upload('attachment.webm', 'video/webm') } } it_behaves_like 'a successful media upload', 'gifv' diff --git a/spec/requests/api/v2/media_spec.rb b/spec/requests/api/v2/media_spec.rb index 990fa5d0ba..97540413f1 100644 --- a/spec/requests/api/v2/media_spec.rb +++ b/spec/requests/api/v2/media_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Media API', :paperclip_processing do +RSpec.describe 'Media API', :attachment_processing do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write' } diff --git a/spec/support/examples/models/concerns/account_avatar.rb b/spec/support/examples/models/concerns/account_avatar.rb index 2c9b5514aa..ab6020d834 100644 --- a/spec/support/examples/models/concerns/account_avatar.rb +++ b/spec/support/examples/models/concerns/account_avatar.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true shared_examples 'AccountAvatar' do |fabricator| - describe 'static avatars', :paperclip_processing do + describe 'static avatars', :attachment_processing do describe 'when GIF' do it 'creates a png static style' do account = Fabricate(fabricator, avatar: attachment_fixture('avatar.gif')) @@ -17,7 +17,7 @@ shared_examples 'AccountAvatar' do |fabricator| end end - describe 'base64-encoded files', :paperclip_processing do + describe 'base64-encoded files', :attachment_processing do let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" } let(:account) { Fabricate(fabricator, avatar: base64_attachment) } diff --git a/spec/support/examples/models/concerns/account_header.rb b/spec/support/examples/models/concerns/account_header.rb index ce09eb006b..43bbdaacf4 100644 --- a/spec/support/examples/models/concerns/account_header.rb +++ b/spec/support/examples/models/concerns/account_header.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true shared_examples 'AccountHeader' do |fabricator| - describe 'base64-encoded files', :paperclip_processing do + describe 'base64-encoded files', :attachment_processing do let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" } let(:account) { Fabricate(fabricator, header: base64_attachment) } diff --git a/spec/system/ocr_spec.rb b/spec/system/ocr_spec.rb index 4f4941adca..cf77b80ea8 100644 --- a/spec/system/ocr_spec.rb +++ b/spec/system/ocr_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'OCR', :js, :paperclip_processing, :sidekiq_inline, :streaming do +describe 'OCR', :attachment_processing, :js, :sidekiq_inline, :streaming do include ProfileStories let(:email) { 'test@example.com' } diff --git a/spec/system/report_interface_spec.rb b/spec/system/report_interface_spec.rb index f82604aae8..e6cc3b1b68 100644 --- a/spec/system/report_interface_spec.rb +++ b/spec/system/report_interface_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'report interface', :js, :paperclip_processing, :streaming do +describe 'report interface', :attachment_processing, :js, :streaming do include ProfileStories let(:email) { 'admin@example.com' } diff --git a/spec/workers/post_process_media_worker_spec.rb b/spec/workers/post_process_media_worker_spec.rb index 828da5244f..1a274623d7 100644 --- a/spec/workers/post_process_media_worker_spec.rb +++ b/spec/workers/post_process_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PostProcessMediaWorker, :paperclip_processing do +describe PostProcessMediaWorker, :attachment_processing do let(:worker) { described_class.new } describe '#perform' do