factories: remove the Rubocop workaround
This commit is contained in:
parent
e523827213
commit
c8ec5c8846
1 changed files with 2 additions and 6 deletions
|
@ -1,13 +1,11 @@
|
||||||
FactoryBot.define do
|
FactoryBot.define do
|
||||||
factory :type_de_champ do
|
factory :type_de_champ do
|
||||||
private { false }
|
|
||||||
|
|
||||||
# Previous line is kept blank so that rubocop does not complain
|
|
||||||
sequence(:libelle) { |n| "Libelle du champ #{n}" }
|
sequence(:libelle) { |n| "Libelle du champ #{n}" }
|
||||||
sequence(:description) { |n| "description du champ #{n}" }
|
sequence(:description) { |n| "description du champ #{n}" }
|
||||||
type_champ { TypeDeChamp.type_champs.fetch(:text) }
|
type_champ { TypeDeChamp.type_champs.fetch(:text) }
|
||||||
order_place { 1 }
|
order_place { 1 }
|
||||||
mandatory { false }
|
mandatory { false }
|
||||||
|
add_attribute(:private) { false }
|
||||||
|
|
||||||
factory :type_de_champ_text do
|
factory :type_de_champ_text do
|
||||||
type_champ { TypeDeChamp.type_champs.fetch(:text) }
|
type_champ { TypeDeChamp.type_champs.fetch(:text) }
|
||||||
|
@ -117,9 +115,7 @@ FactoryBot.define do
|
||||||
end
|
end
|
||||||
|
|
||||||
trait :private do
|
trait :private do
|
||||||
private { true }
|
add_attribute(:private) { true }
|
||||||
|
|
||||||
# Previous line is kept blank so that rubocop does not complain
|
|
||||||
sequence(:libelle) { |n| "Libelle champ privé #{n}" }
|
sequence(:libelle) { |n| "Libelle champ privé #{n}" }
|
||||||
sequence(:description) { |n| "description du champ privé #{n}" }
|
sequence(:description) { |n| "description du champ privé #{n}" }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue