Commit 9218587e authored by Stan Hu's avatar Stan Hu

Merge branch 'mo-fix-false-positive-pipeline-artifact-multibytes' into 'master'

Fix false positive spec on PipelineArtifact

See merge request gitlab-org/gitlab!40867
parents ce00e36f 53dfeeb6
......@@ -15,7 +15,7 @@ FactoryBot.define do
end
trait :with_multibyte_characters do
size { { "utf8" => "✓" }.to_json.size }
size { { "utf8" => "✓" }.to_json.bytesize }
after(:build) do |artifact, _evaluator|
artifact.file = CarrierWaveStringFile.new_file(
file_content: { "utf8" => "✓" }.to_json,
......
......@@ -69,7 +69,7 @@ RSpec.describe Ci::PipelineArtifact, type: :model do
let(:coverage_report_multibyte) { create(:ci_pipeline_artifact, :with_multibyte_characters) }
it 'sets the size in bytesize' do
expect(coverage_report_multibyte.size).to eq(12)
expect(coverage_report_multibyte.size).to eq(14)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment