OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix stubbed attachment service in export job spec
Oliver Günther0c437c3f052b
diff --git a/spec/workers/work_packages/exports/export_job_spec.rb b/spec/workers/work_packages/exports/export_job_spec.rbindex e9ae9a9a51f..99d2d92f86c 100644--- a/spec/workers/work_packages/exports/export_job_spec.rb+++ b/spec/workers/work_packages/exports/export_job_spec.rb@@ -69,21 +69,21 @@ describe WorkPackages::Exports::ExportJob doexpect(Attachments::CreateService).to receive(:new)- .with(export, author: user)+ .with(user: user).and_return(service)expect(WorkPackages::Exports::CleanupOutdatedJob).to receive(:perform_after_grace)expect(service)- .to receive(:call) do |uploaded_file:, description:|- expect(File.basename(uploaded_file))+ .to receive(:call) do |file:, **args|+ expect(File.basename(file)).to start_with 'some_title'- expect(File.basename(uploaded_file))+ expect(File.basename(file)).to end_with ".#{mime_type}"- attachment+ ServiceResult.new(result: attachment, success: true)endallow("WorkPackage::Exporter::#{mime_type.upcase}".constantize)