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.23.6 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.24.2 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.23.5 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.24.1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.24.0 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.24.0.rc2 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.23.4 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.24.0.rc1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.23.3 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.23.2 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.23.1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.23.1.rc1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.23.0 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.22.0 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.21.0 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.20.1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.20.0 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.19.1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.18.1 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb
decidim-core-0.19.0 lib/decidim/core/test/shared_examples/attachable_interface_examples.rb