houdini/lib/templates/rspec/controller/routing_spec.rb.tt

18 lines
561 B
Text
Raw Normal View History

2020-05-01 19:28:55 +00:00
# frozen_string_literal: true
2020-06-12 20:03:43 +00:00
# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE
2020-05-01 19:28:55 +00:00
require 'rails_helper'
<% module_namespacing do -%>
RSpec.describe '<%= class_name %>Controller', <%= type_metatag(:routing) %> do
describe 'routing' do
<% for action in actions -%>
it 'routes to #<%= action %>' do
expect(get: "/<%= class_name.underscore %>/<%= action %>").to route_to("<%= class_name.underscore %>#<%= action %>")
end
<% end -%>
end
end
<% end -%>