add_filter double write
This commit is contained in:
parent
5f6d8e93ca
commit
870d67e844
2 changed files with 5 additions and 0 deletions
|
@ -117,6 +117,7 @@ class ProcedurePresentation < ApplicationRecord
|
|||
'value' => value
|
||||
}
|
||||
|
||||
filters_for(statut) << { id: h_id, filter: value }
|
||||
update(filters: updated_filters)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -862,6 +862,10 @@ describe ProcedurePresentation do
|
|||
{ "label" => first_type_de_champ.libelle, "table" => "type_de_champ", "column" => first_type_de_champ_id, "value" => "true", "value_column" => "value" }
|
||||
]
|
||||
})
|
||||
|
||||
suivis = procedure_presentation.suivis_filters.map { [_1['id'], _1['filter']] }
|
||||
|
||||
expect(suivis).to eq([[{ "column_id" => "type_de_champ/#{first_type_de_champ_id}", "procedure_id" => procedure.id }, "true"]])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue