Trying to test routes similar how you would do it in rails:
describe 'Routes Spec', type: :routing do
describe 'Visitors' do
it "should route '/visitors', :to => 'visitors#create'" do
expect(:post => "/").to route_to(:controller => "create")
end
end
end
But I get the following error:
NoMethodError:
undefined methodroute_to' for #<RSpec::ExampleGroups::RoutesSpec::Visitors:0x00007f87e5e62570> # ./spec/integration/routes_spec.rb:6:in
block (3 levels) in <top (required)>’
Is there a way to test route set up in jets?