diff --git a/spec/controllers/about_controller_spec.rb b/spec/controllers/about_controller_spec.rb index f9fecf7b..79a30785 100644 --- a/spec/controllers/about_controller_spec.rb +++ b/spec/controllers/about_controller_spec.rb @@ -3,6 +3,32 @@ require "rails_helper" describe AboutController, type: :controller do + describe "#index" do + subject { get :index } + + context "advanced layout is enabled" do + before do + allow(APP_CONFIG).to receive(:dig).with(:features, :advanced_frontpage, :enabled).and_return(true) + end + + it "renders the correct template" do + subject + expect(response).to render_template("about/index_advanced") + end + end + + context "advanced layout is disabled" do + before do + allow(APP_CONFIG).to receive(:dig).with(:features, :advanced_frontpage, :enabled).and_return(false) + end + + it "renders the correct template" do + subject + expect(response).to render_template("about/index") + end + end + end + describe "#about" do subject { get :about }