Closed colinux closed 3 months ago
Replacement of the Method in attestation_template_v2s_controller.rb
The code modification in the attestation_template_v2s_controller.rb
file replaces old method @procedure.build_attestation_template
with @procedure.attestation_templates.build
. This new method is simpler because it doesn't require a state
parameter. This change makes the code cleaner and less complex.
Added Expectation in attestation_template_v2s_controller_spec.rb
In order to improve the robustness of our tests, an expectation has been put into place in the attestation_template_v2s_controller_spec.rb
file. This will check if the attestation_template
is present after the above changes, ensuring the code is performing as expected. It's a significant step towards increasing the reliability of our codebase.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.95%. Comparing base (
d609b6b
) to head (5e25547
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
la relation
Procedure#attestation_template
étant unitaire (has_one
), rails supprimait l'existante lorsqu'on en build une nouvelle.