remove_all as there is no some_usager_columns
This commit is contained in:
parent
2181a917a2
commit
92a863d48c
2 changed files with 8 additions and 8 deletions
|
@ -30,7 +30,7 @@ module ColumnsConcern
|
|||
end
|
||||
end
|
||||
|
||||
def all_usager_columns_for_export
|
||||
def usager_columns_for_export
|
||||
columns = [dossier_id_column, user_email_for_display_column, user_france_connected_column]
|
||||
columns.concat(individual_columns) if for_individual
|
||||
columns.concat(moral_columns) if !for_individual
|
||||
|
@ -39,7 +39,7 @@ module ColumnsConcern
|
|||
columns.flatten.compact
|
||||
end
|
||||
|
||||
def all_dossier_columns_for_export
|
||||
def dossier_columns_for_export
|
||||
columns = [dossier_state_column]
|
||||
columns.concat([dossier_archived_column])
|
||||
columns.concat(dossier_dates_columns)
|
||||
|
|
|
@ -146,7 +146,7 @@ describe ColumnsConcern do
|
|||
]
|
||||
end
|
||||
|
||||
describe '#all_usager_columns_for_export' do
|
||||
describe '#usager_columns_for_export' do
|
||||
context 'for individual procedure' do
|
||||
let(:for_individual) { true }
|
||||
|
||||
|
@ -162,7 +162,7 @@ describe ColumnsConcern do
|
|||
procedure.find_column(label: "Nom du mandataire"),
|
||||
procedure.find_column(label: "Prénom du mandataire")
|
||||
]
|
||||
actuals = procedure.all_usager_columns_for_export.map(&:h_id)
|
||||
actuals = procedure.usager_columns_for_export.map(&:h_id)
|
||||
expected.each do |expected_col|
|
||||
expect(actuals).to include(expected_col.h_id)
|
||||
end
|
||||
|
@ -199,7 +199,7 @@ describe ColumnsConcern do
|
|||
procedure.find_column(label: "Entreprise SIRET siège social"),
|
||||
procedure.find_column(label: "Entreprise code effectif entreprise")
|
||||
]
|
||||
actuals = procedure.all_usager_columns_for_export
|
||||
actuals = procedure.usager_columns_for_export
|
||||
expected.each do |expected_col|
|
||||
expect(actuals.map(&:h_id)).to include(expected_col.h_id)
|
||||
end
|
||||
|
@ -217,7 +217,7 @@ describe ColumnsConcern do
|
|||
procedure.find_column(label: "Référentiel De Programmation"),
|
||||
procedure.find_column(label: "Centre De Coût")
|
||||
]
|
||||
actuals = procedure.all_usager_columns_for_export.map(&:h_id)
|
||||
actuals = procedure.usager_columns_for_export.map(&:h_id)
|
||||
expected.each do |expected_col|
|
||||
expect(actuals).to include(expected_col.h_id)
|
||||
end
|
||||
|
@ -225,7 +225,7 @@ describe ColumnsConcern do
|
|||
end
|
||||
end
|
||||
|
||||
describe '#all_dossier_columns_for_export' do
|
||||
describe '#dossier_columns_for_export' do
|
||||
let(:procedure) { create(:procedure_with_dossiers, :routee, :published, types_de_champ_public:, for_individual:) }
|
||||
|
||||
it "returns all dossier columns" do
|
||||
|
@ -241,7 +241,7 @@ describe ColumnsConcern do
|
|||
procedure.find_column(label: "Instructeurs"),
|
||||
procedure.find_column(label: "Groupe instructeur")
|
||||
]
|
||||
actuals = procedure.all_dossier_columns_for_export.map(&:h_id)
|
||||
actuals = procedure.dossier_columns_for_export.map(&:h_id)
|
||||
expected.each do |expected_col|
|
||||
expect(actuals).to include(expected_col.h_id)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue