Merge pull request #7313 from betagouv/sentry/3270418045
fix(commencer#commencer): broken due to missing interpolated variable in i18n
This commit is contained in:
commit
79972ba6a1
2 changed files with 14 additions and 3 deletions
|
@ -71,8 +71,8 @@ module Users
|
|||
|
||||
if procedure&.close?
|
||||
flash.alert = procedure.service.presence ?
|
||||
t('errors.messages.procedure_archived.with_service_and_phone_email', service_phone_number: procedure.service.telephone, service_email: procedure.service.email) :
|
||||
t('errors.messages.procedure_archived.with_organisation_only', organisation_name: procedure.organisation_name)
|
||||
t('errors.messages.procedure_archived.with_service_and_phone_email', service_name: procedure.organisation, service_phone_number: procedure.service.telephone, service_email: procedure.service.email) :
|
||||
t('errors.messages.procedure_archived.with_organisation_only', organisation_name: procedure.organisation)
|
||||
else
|
||||
flash.alert = t('errors.messages.procedure_not_found')
|
||||
end
|
||||
|
|
|
@ -33,8 +33,19 @@ describe Users::CommencerController, type: :controller do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when procedure is closed' do
|
||||
context 'when procedure without service is closed' do
|
||||
it 'works' do
|
||||
published_procedure.service = nil
|
||||
published_procedure.organisation = "hello"
|
||||
published_procedure.close!
|
||||
get :commencer, params: { path: published_procedure.path }
|
||||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when procedure with service is closed' do
|
||||
it 'works' do
|
||||
published_procedure.service = create(:service)
|
||||
published_procedure.close!
|
||||
get :commencer, params: { path: published_procedure.path }
|
||||
expect(response).to redirect_to(root_path)
|
||||
|
|
Loading…
Reference in a new issue