Skip to content

Commit

Permalink
Évolution mineure du test d'affichage de l'éval pdf, pour faciliter l…
Browse files Browse the repository at this point in the history
…a vérif du pdf
  • Loading branch information
etienneCharignon committed Dec 5, 2024
1 parent 3379be2 commit b2999b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/features/admin/evaluation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b2999b4

Please sign in to comment.