replace filter+first with find
This commit is contained in:
parent
dfd2c1ee79
commit
f3e487bd9e
3 changed files with 8 additions and 16 deletions
|
@ -151,13 +151,11 @@ describe AttestationTemplate, type: :model do
|
|||
context 'and their value in the dossier are not nil' do
|
||||
before do
|
||||
dossier.champs
|
||||
.filter { |champ| champ.libelle == 'libelleA' }
|
||||
.first
|
||||
.find { |champ| champ.libelle == 'libelleA' }
|
||||
.update(value: 'libelle1')
|
||||
|
||||
dossier.champs
|
||||
.filter { |champ| champ.libelle == 'libelleB' }
|
||||
.first
|
||||
.find { |champ| champ.libelle == 'libelleB' }
|
||||
.update(value: 'libelle2')
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue