Sha256: 198894f476251a1dbb6007a7a79d8204802b1ae0f8d02beae06db046d480f20b
Contents?: true
Size: 1.06 KB
Versions: 9
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true require "spec_helper" require "decidim/dev/test/promoted_participatory_processes_shared_examples" module Decidim module Devise describe PagesController, type: :controller do routes { Decidim::Core::Engine.routes } let(:organization) { create :organization } include_examples "with promoted participatory processes" context "when a template exists" do it "renders it" do get :show, params: { id: "home" } expect(response).to render_template(:home) end end context "when a page exists" do let(:page) { create(:static_page, organization: organization) } render_views it "renders the page contents" do get :show, params: { id: page.slug } expect(response).to render_template(:decidim_page) expect(controller.page).to eq(page) expect(response.body).to include(page.title[I18n.locale.to_s]) expect(response.body).to include(page.content[I18n.locale.to_s]) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems