Sha256: ac154e55a9ceb490ec75053239ee20f7a61de331fedc116dc466a0c241e58caf

Contents?: true

Size: 839 Bytes

Versions: 4

Compression:

Stored size: 839 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"
require "decidim/api/test/type_context"

module Decidim
  module Api
    describe QueryType do
      include_context "graphql type"

      describe "processes" do
        let!(:process1) { create(:participatory_process, organization: current_organization) }
        let!(:process2) { create(:participatory_process, organization: current_organization) }
        let!(:process3) { create(:participatory_process) }

        let(:query) { %({ processes { id }}) }

        it "returns all the processes" do
          expect(response["processes"]).to     include("id" => process1.id.to_s)
          expect(response["processes"]).to     include("id" => process2.id.to_s)
          expect(response["processes"]).not_to include("id" => process3.id.to_s)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-0.3.2 decidim-api/spec/types/query_type_spec.rb
decidim-0.3.1 decidim-api/spec/types/query_type_spec.rb
decidim-0.3.0 decidim-api/spec/types/query_type_spec.rb
decidim-0.2.0 decidim-api/spec/types/query_type_spec.rb