Sha256: c5fef40a01150e04d75b2d29377730523a22e47299f6c9e151e1d6c8d1dd8d0c
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
# frozen_string_literal: true shared_context "with menu hacks params" do let(:organization) { create(:organization) } let(:context) do { current_user: create(:user, organization:), current_organization: organization } end let(:params) do { menu_id:, raw_label: label, url:, position:, target:, visibility: } end let(:menu_id) { menu_name.to_sym } let(:attributes) do { "label" => label, "url" => url, "position" => position, "target" => target, "visibility" => visibility } end let(:label) do { "en" => "Menu english", "ca" => "Menu catalan" } end let(:url) { "/some-path" } let(:position) { 2 } let(:target) { "_blank" } let(:visibility) { "hidden" } let(:another_params) do { allow_images_in_editors: true, allow_videos_in_editors: true } end let(:form) do Decidim::DecidimAwesome::Admin::MenuForm.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
2 entries across 2 versions & 1 rubygems