feat(gallery): add badge for date of created_at or updated_at

This commit is contained in:
Eric Leroy-Terquem 2024-09-09 18:01:24 +02:00
parent 3560d73b58
commit df08617387
No known key found for this signature in database
GPG key ID: 53D8FAECEF207605
6 changed files with 36 additions and 0 deletions

View file

@ -25,6 +25,10 @@ RSpec.describe Attachment::GalleryItemComponent, type: :component do
expect(component.title).to eq("#{libelle} -- #{filename}")
end
it "displays when gallery item has been added" do
expect(subject).to have_text(component.helpers.try_format_datetime(attachment.record.created_at, format: :veryshort))
end
context "when gallery item is in page Demande" do
let(:gallery_demande) { true }