Simplify component test stubbing controller path
This is possible due to the changes in commit 6df7f7d05.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user