Sha256: ebc42ec69ffa33e091161c4753988f482b3aaed80a429fd415cafecc8f672d60

Contents?: true

Size: 484 Bytes

Versions: 9

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

shared_examples_for "attachable interface" do
  let!(:attachments) { create_list(:attachment, 3, attached_to: model) }

  describe "attachments" do
    let(:query) { "{ attachments { url } }" }

    it "includes the attachment urls" do
      attachment_urls = response["attachments"].map { |attachment| attachment["url"] }
      expect(attachment_urls).to include_blob_urls(*attachments.map(&:file).map(&:blob))
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
decidim-core-0.30.0.rc2 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.30.0.rc1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.29.2 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.28.5 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.29.1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.28.4 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.29.0 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.28.3 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.29.0.rc4 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb