Commit 53dfeeb6 authored by Maxime Orefice's avatar Maxime Orefice

Fix false positive spec on PipelineArtifact

parent 7f6fc1bc
......@@ -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