Skip to content

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

Make rubocop happier

Christophe Bliard73a461c9a610
diff --git a/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb b/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb
index f9d6225fafb..7060d2f06fe 100644
--- a/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb
+++ b/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb
@@ -67,7 +67,7 @@ RSpec.shared_examples 'it supports direct uploads' do
end
end
- context 'with remote AWS storage', with_direct_uploads: true do
+ context 'with remote AWS storage', :with_direct_uploads do
before do
request!
end
@@ -186,7 +186,7 @@ RSpec.shared_examples 'it supports direct uploads' do
end
end
-RSpec.shared_examples 'an APIv3 attachment resource', content_type: :json, type: :request do |include_by_container = true|
+RSpec.shared_examples 'an APIv3 attachment resource', content_type: :json, type: :request do |include_by_container: true|
include Rack::Test::Methods
include API::V3::Utilities::PathHelper
include FileHelpers
@@ -210,7 +210,7 @@ RSpec.shared_examples 'an APIv3 attachment resource', content_type: :json, type:
let(:attachment_type) { raise "attachment type goes here, e.g. work_package" }
let(:permissions) { all_permissions }
- let(:all_permissions) { Array([create_permission, read_permission, update_permission]).flatten.compact }
+ let(:all_permissions) { [create_permission, read_permission, update_permission].flatten.compact }
let(:create_permission) { raise "permissions go here, e.g. add_work_packages" }
let(:read_permission) { raise "permissions go here, e.g. view_work_packages" }
diff --git a/spec/requests/api/v3/attachments/forum_message_spec.rb b/spec/requests/api/v3/attachments/forum_message_spec.rb
index 50025bd5260..31e4e1faae2 100644
--- a/spec/requests/api/v3/attachments/forum_message_spec.rb
+++ b/spec/requests/api/v3/attachments/forum_message_spec.rb
@@ -27,10 +27,10 @@
#++
require 'spec_helper'
-require_relative './attachment_resource_shared_examples'
+require_relative 'attachment_resource_shared_examples'
RSpec.describe "forum message attachments" do
- it_behaves_like "an APIv3 attachment resource", include_by_container = false do
+ it_behaves_like "an APIv3 attachment resource", include_by_container: false do
let(:attachment_type) { :forum_message }
let(:create_permission) { nil }
diff --git a/spec/requests/api/v3/attachments/work_packages_export_spec.rb b/spec/requests/api/v3/attachments/work_packages_export_spec.rb
index 9a9f058bbb2..ccfb1955d4b 100644
--- a/spec/requests/api/v3/attachments/work_packages_export_spec.rb
+++ b/spec/requests/api/v3/attachments/work_packages_export_spec.rb
@@ -27,10 +27,10 @@
#++
require 'spec_helper'
-require_relative './attachment_resource_shared_examples'
+require_relative 'attachment_resource_shared_examples'
RSpec.describe "WorkPackages::Export attachments" do
- it_behaves_like "an APIv3 attachment resource", include_by_container = false do
+ it_behaves_like "an APIv3 attachment resource", include_by_container: false do
let(:attachment_type) { :export }
let(:create_permission) { :export_work_packages }