Merge pull request #11337 from macanudo527/fix_rubocop_6

Fix autocorrect Rails Cops 2
This commit is contained in:
Maikel
2023-08-17 10:39:34 +10:00
committed by GitHub
23 changed files with 59 additions and 104 deletions

View File

@@ -10,7 +10,7 @@ describe Api::V0::ProductImagesController, type: :controller do
describe "uploading an image" do
let(:image) { Rack::Test::UploadedFile.new(black_logo_file, 'image/png') }
let(:pdf) { Rack::Test::UploadedFile.new(pdf_path, 'application/pdf') }
let(:pdf_path) { Rails.root.join("public/Terms-of-service.pdf") }
let(:pdf_path) { Rails.public_path.join('Terms-of-service.pdf') }
let(:product_without_image) { create(:product) }
let(:product_with_image) { create(:product_with_image) }
let(:current_api_user) { create(:admin_user) }

View File

@@ -12,7 +12,7 @@ module Api
let(:enterprise_manager) { create(:user, enterprises: [enterprise]) }
describe "removing terms and conditions file" do
let(:terms_file_path) { Rails.root.join("public/Terms-of-service.pdf") }
let(:terms_file_path) { Rails.public_path.join('Terms-of-service.pdf') }
let(:terms_and_conditions_file) {
Rack::Test::UploadedFile.new(terms_file_path, "application/pdf")
}