From 01ac4d7e19709ea3d3b7cf3c5252bfa818095da2 Mon Sep 17 00:00:00 2001 From: clemkeirua Date: Mon, 14 Sep 2020 22:31:09 +0200 Subject: [PATCH] remove operation_log_serialize_subject --- app/models/dossier_operation_log.rb | 2 -- config/initializers/flipper.rb | 1 - spec/controllers/instructeurs/dossiers_controller_spec.rb | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/dossier_operation_log.rb b/app/models/dossier_operation_log.rb index 82b0100c7..301dd1b3a 100644 --- a/app/models/dossier_operation_log.rb +++ b/app/models/dossier_operation_log.rb @@ -85,8 +85,6 @@ class DossierOperationLog < ApplicationRecord def self.serialize_subject(subject) if subject.nil? nil - elsif !Flipper.enabled?(:operation_log_serialize_subject) - { id: subject.id } else case subject when Dossier diff --git a/config/initializers/flipper.rb b/config/initializers/flipper.rb index d91b227e9..2da7567cc 100644 --- a/config/initializers/flipper.rb +++ b/config/initializers/flipper.rb @@ -33,7 +33,6 @@ features = [ :autosave_dossier_draft, :maintenance_mode, :mini_profiler, - :operation_log_serialize_subject, :xray, :carte_ign, :localization diff --git a/spec/controllers/instructeurs/dossiers_controller_spec.rb b/spec/controllers/instructeurs/dossiers_controller_spec.rb index a967a0d80..9301112b0 100644 --- a/spec/controllers/instructeurs/dossiers_controller_spec.rb +++ b/spec/controllers/instructeurs/dossiers_controller_spec.rb @@ -307,6 +307,7 @@ describe Instructeurs::DossiersController, type: :controller do before do attestation = Attestation.new allow(attestation).to receive(:pdf).and_return(double(read: 'pdf', size: 2.megabytes)) + allow(attestation).to receive(:pdf_url).and_return('http://some_document_url') allow_any_instance_of(Dossier).to receive(:build_attestation).and_return(attestation) end