test: fix for mutable string
This commit is contained in:
parent
6d9a7648e2
commit
659d35e11f
6 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dossiers::DeletedDossiersComponent < ApplicationComponent
|
||||
include DossierHelper
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RenameSupprimesRecemmentFromProcedurePresentation < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
ProcedurePresentation.update_all(%Q(filters = filters || '{"supprimes": []}'))
|
||||
|
|
|
@ -834,7 +834,7 @@ describe ProcedurePresentation do
|
|||
let(:procedure) { create(:procedure, types_de_champ_public: [{ type: :yes_no }]) }
|
||||
|
||||
it 'should downcase and transform value' do
|
||||
procedure_presentation.add_filter("suivis", "type_de_champ/#{first_type_de_champ_id}", "Oui")
|
||||
procedure_presentation.add_filter("suivis", "type_de_champ/#{first_type_de_champ_id}", +"Oui")
|
||||
|
||||
expect(procedure_presentation.filters).to eq({
|
||||
"suivis" =>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
describe Siret, type: :model do
|
||||
subject { Siret.new(siret: siret) }
|
||||
subject { Siret.new(siret: siret.dup) } # .dup in order to simulate a non literal user string
|
||||
|
||||
context 'with no siret provided' do
|
||||
let(:siret) { '' }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
describe FranceConnectService do
|
||||
describe '.retrieve_user_informations_particulier' do
|
||||
let(:code) { 'plop' }
|
||||
let(:access_token) { 'my access_token' }
|
||||
let(:access_token) { +'my access_token' }
|
||||
|
||||
let(:given_name) { 'plop1' }
|
||||
let(:family_name) { 'plop2' }
|
||||
|
|
|
@ -112,7 +112,7 @@ describe ProcedureArchiveService do
|
|||
expect(zip_entries.map(&:filename)).to match_array(structure)
|
||||
zip_entries.map do |entry|
|
||||
next unless entry.filename == "#{service.send(:zip_root_folder, archive)}/-LISTE-DES-FICHIERS-EN-ERREURS.txt"
|
||||
extracted_content = ""
|
||||
extracted_content = +""
|
||||
extractor = entry.extractor_from(f)
|
||||
extracted_content << extractor.extract(1024 * 1024) until extractor.eof?
|
||||
expect(extracted_content).to match(/Impossible de .* .*cni.*png/)
|
||||
|
|
Loading…
Reference in a new issue