Sha256: 5695f980352014018f9bc9761315102e58f22ab342599afc3dc7ef585ab548c4

Contents?: true

Size: 660 Bytes

Versions: 36

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

shared_examples_for "has attachments" do
  context "when it has attachments", processing_uploads_for: Decidim::AttachmentUploader do
    let!(:document) { create(:attachment, :with_pdf, attached_to: attached_to) }

    let!(:image) { create(:attachment, attached_to: attached_to) }

    before do
      visit current_path
    end

    it "shows them" do
      within "div.wrapper .documents" do
        expect(page).to have_content(/#{translated(document.title, locale: :en)}/i)
      end

      within "div.wrapper .images" do
        expect(page).to have_css("img.thumbnail")
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
decidim-core-0.9.3 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.9.2 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.9.1 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.9.0 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.8.4 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.8.3 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.8.2 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.8.1 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.8.0 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.7.4 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.7.3 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.7.2 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.7.1 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.7.0 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.6.8 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-0.6.8 decidim-core/lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.6.7 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-0.6.7 decidim-core/lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-core-0.6.6 lib/decidim/core/test/shared_examples/has_attachments.rb
decidim-0.6.6 decidim-core/lib/decidim/core/test/shared_examples/has_attachments.rb