Skip to content

Commit

Permalink
fix(spec.champs): stop using champs factories
Browse files Browse the repository at this point in the history
  • Loading branch information
mfo committed Jul 9, 2024
1 parent 9c0c41b commit 6a10a89
Show file tree
Hide file tree
Showing 16 changed files with 229 additions and 194 deletions.
2 changes: 1 addition & 1 deletion app/controllers/administrateurs/procedures_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def filter_procedures(filter)
procedures_result = procedures_result.where(aasm_state: filter.statuses) if filter.statuses.present?
procedures_result = procedures_result.where("tags @> ARRAY[?]::text[]", filter.tags) if filter.tags.present?
procedures_result = procedures_result.where(template: true) if filter.template?
procedures_result = procedures_result.where('published_at >= ?', filter.from_publication_date) if filter.from_publication_date.present?
procedures_result = procedures_result.where(published_at: filter.from_publication_date..) if filter.from_publication_date.present?
procedures_result = procedures_result.where(service: service) if filter.service_siret.present?
procedures_result = procedures_result.where(service: services) if services
procedures_result = procedures_result.where(for_individual: filter.for_individual) if filter.for_individual.present?
Expand Down
1 change: 0 additions & 1 deletion app/models/type_de_champ.rb
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ def use_default_value?(type_champ, champ)
return true if type_champ_to_champ_class_name(type_champ) != champ.type
# special case for linked drop down champ – it's blank implementation is not what you think
return champ.value.blank? if type_champ == TypeDeChamp.type_champs.fetch(:linked_drop_down_list)

champ.blank?
end
end
Expand Down
56 changes: 0 additions & 56 deletions spec/models/champ_shared_example.rb

This file was deleted.

Loading

0 comments on commit 6a10a89

Please sign in to comment.