Simplify component test stubbing controller path

This is possible due to the changes in commit 6df7f7d05.
This commit is contained in:
Javi Martín
2021-08-12 22:59:47 +02:00
parent 5f19d73b40
commit a9095d1b6a

View File

@@ -17,12 +17,10 @@ describe Shared::AdvancedSearchComponent, type: :component do
end end
end end
describe "SDG filter" do describe "SDG filter", controller: ProposalsController do
before do before do
Setting["feature.sdg"] = true Setting["feature.sdg"] = true
Setting["sdg.process.proposals"] = true Setting["sdg.process.proposals"] = true
allow(component).to receive(:controller_path).and_return("proposals")
end end
it "does not render when the feature is disabled" do it "does not render when the feature is disabled" do