From b2999b40a5a0262930783e6828312e57a8ad637f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Charignon?= Date: Thu, 5 Dec 2024 12:12:27 +0100 Subject: [PATCH] =?UTF-8?q?=C3=89volution=20mineure=20du=20test=20d'affich?= =?UTF-8?q?age=20de=20l'=C3=A9val=20pdf,=20pour=20faciliter=20la=20v=C3=A9?= =?UTF-8?q?rif=20du=20pdf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/features/admin/evaluation_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/features/admin/evaluation_spec.rb b/spec/features/admin/evaluation_spec.rb index 5fdc59139..d31c44ad3 100644 --- a/spec/features/admin/evaluation_spec.rb +++ b/spec/features/admin/evaluation_spec.rb @@ -245,11 +245,14 @@ visit admin_evaluation_path(mon_evaluation, format: :pdf) # rubocop:disable Lint/Debugger path = page.save_page + pdf_path = path.sub('.html', '.pdf') + File.rename(path, pdf_path) # Renomme l'extension du fichier pour pouvoir l'ouvrir + # system("open #{pdf_path}") # rubocop:enable Lint/Debugger - reader = PDF::Reader.new(path) + reader = PDF::Reader.new(pdf_path) expect(reader.page(1).text).to include('Roger') - expect(reader.page(1).text).to include('structure') + expect(reader.page(2).text).to include('structure') end end end