move/rename faceting components within their instructeur ns
This commit is contained in:
parent
61051771a7
commit
31255b69cc
13 changed files with 30 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
describe Dossiers::InstructeurFilterComponent, type: :component do
|
||||
describe Instructeurs::ColumnFilterComponent, type: :component do
|
||||
let(:component) { described_class.new(procedure:, procedure_presentation:, statut:, facet:) }
|
||||
|
||||
let(:instructeur) { create(:instructeur) }
|
24
spec/components/instructeurs/column_picker_component_spec.rb
Normal file
24
spec/components/instructeurs/column_picker_component_spec.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
describe Instructeurs::ColumnPickerComponent, type: :component do
|
||||
let(:component) { described_class.new(procedure:, procedure_presentation:) }
|
||||
|
||||
let(:procedure) { create(:procedure) }
|
||||
let(:instructeur) { create(:instructeur) }
|
||||
let(:assign_to) { create(:assign_to, procedure: procedure, instructeur: instructeur) }
|
||||
let(:procedure_presentation) { create(:procedure_presentation, assign_to: assign_to) }
|
||||
|
||||
describe "#displayable_fields_for_select" do
|
||||
let(:default_user_email) { Facet.new(label: 'email', table: 'user', column: 'email') }
|
||||
let(:excluded_displayable_field) { Facet.new(label: "label1", table: "table1", column: "column1", virtual: true) }
|
||||
|
||||
subject { component.displayable_fields_for_select }
|
||||
|
||||
before do
|
||||
allow(Facet).to receive(:facets).and_return([
|
||||
default_user_email,
|
||||
excluded_displayable_field
|
||||
])
|
||||
end
|
||||
|
||||
it { is_expected.to eq([[["email", "user/email"]], ["user/email"]]) }
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue