Sha256: 2f9d795d114766dcd1145c473608d320ca400fe421911cc963132580ced8cde0

Contents?: true

Size: 461 Bytes

Versions: 83

Compression:

Stored size: 461 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(*attachments.map(&:url))
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
decidim-core-0.12.0.pre lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.11.1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.11.0.pre1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb