mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 08:29:53 +01:00
Add specs for correct template in about controller
This commit is contained in:
parent
a07c5b962a
commit
63ca38ccbc
1 changed files with 26 additions and 0 deletions
|
@ -3,6 +3,32 @@
|
||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe AboutController, type: :controller do
|
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
|
describe "#about" do
|
||||||
subject { get :about }
|
subject { get :about }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue