Sha256: 91d9850b7c96bb0d6b3c272205636763f745a287a1e283e53df32635e4c07d43
Contents?: true
Size: 843 Bytes
Versions: 12
Compression:
Stored size: 843 Bytes
Contents
# frozen_string_literal: true require "spec_helper" module Decidim module System describe CreateDefaultPages do let(:organization) { create(:organization) } subject { described_class.new(organization).call } it "creates all the default pages for an organization" do expect do subject end.to change { organization.static_pages.count }.by(Decidim::StaticPage::DEFAULT_PAGES.length) end it "sets the content with each locale" do allow(Decidim).to receive(:available_locales).and_return [:en, :ca] subject organization.static_pages.each do |page| expect(page.title["en"]).to be expect(page.title["ca"]).to be expect(page.content["en"]).to be expect(page.content["ca"]).to be end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems