Sha256: 207f4c76f638bc10da8a06191a276d8579b0e28564bda9111e2676d4db91d9aa

Contents?: true

Size: 699 Bytes

Versions: 46

Compression:

Stored size: 699 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_context "when in a resource" do
  routes { Decidim::Core::Engine.routes }

  let(:resource) { create(:dummy_resource, component: component) }
  let(:user) { create(:user, :confirmed, organization: component.organization) }
  let(:params) do
    {
      id: resource.to_gid.to_param,
      component_id: component.id,
      participatory_process_slug: component.participatory_space.slug
    }
  end

  before do
    request.env["decidim.current_organization"] = component.organization
    request.env["decidim.current_component"] = component
    request.env["decidim.current_participatory_space"] = component.participatory_space
    sign_in user
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
decidim-core-0.27.9 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.8 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.7 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.6 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.26.10 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.26.9 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.5 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.26.8 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.4 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.3 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.26.7 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.26.5 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.2 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.1 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.26.4 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.0 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.26.3 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.0.rc2 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.27.0.rc1 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb
decidim-core-0.26.2 lib/decidim/core/test/shared_examples/endorsements_controller_shared_context.rb