diff --git a/app/views/layouts/_flash.html.slim b/app/views/layouts/_flash.html.slim deleted file mode 100644 index 5415e42d2e..0000000000 --- a/app/views/layouts/_flash.html.slim +++ /dev/null @@ -1,8 +0,0 @@ -- %i[success notice error alert].each do |type| - - if flash[type] - .row.mt-2 - .col-md-12 - .d-print-none.alert.alert-dismissible.fade.show class=alert_class_for(type) - a.close.rdv-background-image-none(href="#" data-dismiss="alert" aria-label='Close') - i.fa.fa-times - = sanitize(flash[type], tags: %w[a br strong em], scrubber: :prune) diff --git a/spec/views/flash_spec.rb b/spec/views/flash_spec.rb index 73a0fe58fb..cd72c99e63 100644 --- a/spec/views/flash_spec.rb +++ b/spec/views/flash_spec.rb @@ -1,9 +1,9 @@ -RSpec.describe "layouts/_flash", type: :view do +RSpec.describe "layouts/_flash_dsfr", type: :view do it "sanitizes JS out of links" do notice = <<~HTML Cliquez ici HTML - render(partial: "layouts/flash", locals: { flash: { notice: notice } }) + render(partial: "layouts/flash_dsfr", locals: { flash: { notice: notice } }) expect(rendered).to include("Cliquez ici") end @@ -28,7 +28,7 @@ Less important HTML - render(partial: "layouts/flash", locals: { flash: { notice: notice } }) + render(partial: "layouts/flash_dsfr", locals: { flash: { notice: notice } }) expect(rendered.squish).to include(expected_output.squish) end end