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.27.9 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.27.8 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.29.0.rc3 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.29.0.rc2 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.29.0.rc1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.28.2 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.27.7 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.28.1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.27.6 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.26.10 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.26.9 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.28.0 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.27.5 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.28.0.rc5 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.28.0.rc4 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.26.8 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.27.4 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.27.3 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.26.7 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.26.5 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb