Skip to content

[Tech] Refactor rdv.name_for_user and agent to separate helpers

Vincent Agnano requested to merge refactor/rdv-name-helpers into master

Created by: adipasquale

preliminary to #534 where I'll be adding behaviour to these methods.

I don't think these methods belong to the RDV model but to a helper as they are only presentational.

I've slightly refactored the specs to expect for more 'hardcoded' instead of dynamic values that rely on the seeds generated by the factories. I find it much less error prone and more explicit this way.

I've also added a dedicated spec file for the RdvsHelper where I'm unit testing these methods

this PR can be read commit by commit

Merge request reports