Sha256: ac9261c9b3cdf0cf954bdb139b45b2b69b9f65f781e3392102d99177d7427138

Contents?: true

Size: 865 Bytes

Versions: 20

Compression:

Stored size: 865 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

module Decidim
  module Pages
    module Admin
      describe PageForm do
        let(:current_organization) { create(:organization) }

        let(:body) do
          {
            "en" => "<p>Content</p>",
            "ca" => "<p>Contingut</p>",
            "es" => "<p>Contenido</p>"
          }
        end

        let(:commentable) { true }

        let(:attributes) do
          {
            "page" => {
              "body" => body,
              "commentable" => commentable
            }
          }
        end

        subject do
          described_class.from_params(attributes).with_context(
            current_organization: current_organization
          )
        end

        context "when everything is OK" do
          it { is_expected.to be_valid }
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
decidim-0.6.8 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.6.7 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.6.6 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.6.5 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.6.4 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.6.3 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.6.2 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.6.1 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.6.0 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.5.1 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.5.0 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.4.4 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.4.3 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.4.2 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.4.1 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.4.0 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.3.2 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.3.1 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.3.0 decidim-pages/spec/forms/page_form_spec.rb
decidim-0.2.0 decidim-pages/spec/forms/page_form_spec.rb