fix(api_token): improuve flaky test

This commit is contained in:
Paul Chavard 2023-03-22 11:18:49 +01:00
parent dbd658d2bb
commit 48733a1d15

View file

@ -101,7 +101,7 @@ describe APIToken, type: :model do
end end
it do it do
expect(api_token.procedure_ids).to eq([procedure.id, other_procedure.id]) expect(api_token.procedure_ids).to match_array([procedure.id, other_procedure.id])
expect(api_token.allowed_procedure_ids).to eq([procedure.id]) expect(api_token.allowed_procedure_ids).to eq([procedure.id])
expect(api_token.context).to eq(administrateur_id: administrateur.id, procedure_ids: [procedure.id], write_access: true) expect(api_token.context).to eq(administrateur_id: administrateur.id, procedure_ids: [procedure.id], write_access: true)
end end