test(procedure.direction): can we drop this column ?
This commit is contained in:
parent
69ef54a173
commit
6752da40a9
6 changed files with 1 additions and 13 deletions
|
@ -19,7 +19,6 @@ class ProcedureDashboard < Administrate::BaseDashboard
|
|||
zone: Field::BelongsTo,
|
||||
lien_site_web: Field::String, # TODO: use Field::Url when administrate-v0.12 will be released
|
||||
organisation: Field::String,
|
||||
direction: Field::String,
|
||||
created_at: Field::DateTime,
|
||||
updated_at: Field::DateTime,
|
||||
for_individual: Field::Boolean,
|
||||
|
@ -67,7 +66,6 @@ class ProcedureDashboard < Administrate::BaseDashboard
|
|||
:description,
|
||||
:lien_site_web,
|
||||
:organisation,
|
||||
:direction,
|
||||
:zone,
|
||||
:service,
|
||||
:created_at,
|
||||
|
|
|
@ -62,7 +62,7 @@ class Procedure < ApplicationRecord
|
|||
|
||||
include Discard::Model
|
||||
self.discard_column = :hidden_at
|
||||
self.ignored_columns = [:durees_conservation_required, :cerfa_flag, :test_started_at]
|
||||
self.ignored_columns = [:direction, :durees_conservation_required, :cerfa_flag, :test_started_at]
|
||||
|
||||
default_scope -> { kept }
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ class ProcedureSerializer < ActiveModel::Serializer
|
|||
attributes :id,
|
||||
:description,
|
||||
:organisation,
|
||||
:direction,
|
||||
:archived_at,
|
||||
:geographic_information,
|
||||
:total_dossier,
|
||||
|
|
|
@ -6,7 +6,6 @@ describe Administrateurs::ProceduresController, type: :controller do
|
|||
let(:libelle) { 'Démarche de test' }
|
||||
let(:description) { 'Description de test' }
|
||||
let(:organisation) { 'Organisation de test' }
|
||||
let(:direction) { 'Direction de test' }
|
||||
let(:ministere) { create(:zone) }
|
||||
let(:cadre_juridique) { 'cadre juridique' }
|
||||
let(:duree_conservation_dossiers_dans_ds) { 3 }
|
||||
|
@ -52,7 +51,6 @@ describe Administrateurs::ProceduresController, type: :controller do
|
|||
libelle: libelle,
|
||||
description: description,
|
||||
organisation: organisation,
|
||||
direction: direction,
|
||||
ministere: ministere,
|
||||
cadre_juridique: cadre_juridique,
|
||||
duree_conservation_dossiers_dans_ds: duree_conservation_dossiers_dans_ds,
|
||||
|
@ -206,7 +204,6 @@ describe Administrateurs::ProceduresController, type: :controller do
|
|||
it { expect(subject.libelle).to eq(libelle) }
|
||||
it { expect(subject.description).to eq(description) }
|
||||
it { expect(subject.organisation).to eq(organisation) }
|
||||
it { expect(subject.direction).to eq(direction) }
|
||||
it { expect(subject.administrateurs).to eq([admin]) }
|
||||
it { expect(subject.duree_conservation_dossiers_dans_ds).to eq(duree_conservation_dossiers_dans_ds) }
|
||||
end
|
||||
|
@ -276,7 +273,6 @@ describe Administrateurs::ProceduresController, type: :controller do
|
|||
let(:libelle) { 'Blable' }
|
||||
let(:description) { 'blabla' }
|
||||
let(:organisation) { 'plop' }
|
||||
let(:direction) { 'plap' }
|
||||
let(:duree_conservation_dossiers_dans_ds) { 7 }
|
||||
let(:procedure_expires_when_termine_enabled) { true }
|
||||
|
||||
|
@ -288,7 +284,6 @@ describe Administrateurs::ProceduresController, type: :controller do
|
|||
it { expect(subject.libelle).to eq(libelle) }
|
||||
it { expect(subject.description).to eq(description) }
|
||||
it { expect(subject.organisation).to eq(organisation) }
|
||||
it { expect(subject.direction).to eq(direction) }
|
||||
it { expect(subject.duree_conservation_dossiers_dans_ds).to eq(duree_conservation_dossiers_dans_ds) }
|
||||
it { expect(subject.procedure_expires_when_termine_enabled).to eq(true) }
|
||||
end
|
||||
|
@ -330,8 +325,6 @@ describe Administrateurs::ProceduresController, type: :controller do
|
|||
it { expect(subject.libelle).to eq procedure_params[:libelle] }
|
||||
it { expect(subject.description).to eq procedure_params[:description] }
|
||||
it { expect(subject.organisation).to eq procedure_params[:organisation] }
|
||||
it { expect(subject.direction).to eq procedure_params[:direction] }
|
||||
|
||||
it { expect(subject.for_individual).not_to eq procedure_params[:for_individual] }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -34,7 +34,6 @@ describe API::V1::ProceduresController, type: :controller do
|
|||
it { expect(subject[:label]).to eq(procedure.libelle) }
|
||||
it { expect(subject[:description]).to eq(procedure.description) }
|
||||
it { expect(subject[:organisation]).to eq(procedure.organisation) }
|
||||
it { expect(subject[:direction]).to eq(procedure.direction) }
|
||||
it { expect(subject[:archived_at]).to eq(procedure.closed_at) }
|
||||
it { expect(subject[:total_dossier]).to eq(procedure.total_dossier) }
|
||||
it { is_expected.to have_key(:types_de_champ) }
|
||||
|
|
|
@ -5,7 +5,6 @@ FactoryBot.define do
|
|||
sequence(:libelle) { |n| "Procedure #{n}" }
|
||||
description { "Demande de subvention à l'intention des associations" }
|
||||
organisation { "Orga DINUM" }
|
||||
direction { "direction DINUM" }
|
||||
cadre_juridique { "un cadre juridique important" }
|
||||
published_at { nil }
|
||||
duree_conservation_dossiers_dans_ds { 3 }
|
||||
|
|
Loading…
Reference in a new issue