Sha256: 34d91d1c1d6c8b40ee9b30c0c5da2825e7dc1779287190996f0fb4a8c41dbe03

Contents?: true

Size: 1.14 KB

Versions: 10

Compression:

Stored size: 1.14 KB

Contents

# frozen_string_literal: true

shared_context "with custom redirects params" do
  let(:organization) { create(:organization) }
  let(:context) do
    {
      current_user: create(:user, organization: organization),
      current_organization: organization
    }
  end
  let(:params) do
    {
      origin: origin,
      destination: destination,
      active: active,
      pass_query: pass_query
    }
  end
  let(:attributes) do
    [
      origin,
      {
        "destination" => destination,
        "active" => active,
        "pass_query" => pass_query
      }
    ]
  end
  let(:origin) { "/origin" }
  let(:destination) { "/processes" }
  let(:active) { true }
  let(:pass_query) { true }

  let(:another_params) do
    {
      allow_images_in_full_editor: true,
      allow_images_in_small_editor: true
    }
  end
  let(:form) do
    Decidim::DecidimAwesome::Admin::CustomRedirectForm.from_params(params).with_context(context)
  end
  let(:another_form) do
    Decidim::DecidimAwesome::Admin::ConfigForm.from_params(another_params).with_context(context)
  end
  let(:another_config) { Decidim::DecidimAwesome::Admin::UpdateConfig.new(another_form) }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-decidim_awesome-0.10.3 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.10.2 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.10.1 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.10.0 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.9.3 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.9.1 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.8.3 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.8.2 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.8.1 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb
decidim-decidim_awesome-0.8.0 lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb