fix(commencer#commencer): broken due to missing interpolated variable in i18n
This commit is contained in:
parent
467eee0e76
commit
da57a1dc9e
2 changed files with 14 additions and 3 deletions
|
@ -71,8 +71,8 @@ module Users
|
||||||
|
|
||||||
if procedure&.close?
|
if procedure&.close?
|
||||||
flash.alert = procedure.service.presence ?
|
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_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_name)
|
t('errors.messages.procedure_archived.with_organisation_only', organisation_name: procedure.organisation)
|
||||||
else
|
else
|
||||||
flash.alert = t('errors.messages.procedure_not_found')
|
flash.alert = t('errors.messages.procedure_not_found')
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,8 +33,19 @@ describe Users::CommencerController, type: :controller do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when procedure is closed' do
|
context 'when procedure without service is closed' do
|
||||||
it 'works' 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!
|
published_procedure.close!
|
||||||
get :commencer, params: { path: published_procedure.path }
|
get :commencer, params: { path: published_procedure.path }
|
||||||
expect(response).to redirect_to(root_path)
|
expect(response).to redirect_to(root_path)
|
||||||
|
|
Loading…
Reference in a new issue