require "rails_helper" RSpec.describe Crm::CustomersController, type: :routing do describe "routing" do it "routes to #index" do expect(:get => "/crm/customers").to route_to("crm/customers#index") end it "routes to #new" do expect(:get => "/crm/customers/new").to route_to("crm/customers#new") end it "routes to #show" do expect(:get => "/crm/customers/1").to route_to("crm/customers#show", :id => "1") end it "routes to #edit" do expect(:get => "/crm/customers/1/edit").to route_to("crm/customers#edit", :id => "1") end it "routes to #create" do expect(:post => "/crm/customers").to route_to("crm/customers#create") end it "routes to #update via PUT" do expect(:put => "/crm/customers/1").to route_to("crm/customers#update", :id => "1") end it "routes to #update via PATCH" do expect(:patch => "/crm/customers/1").to route_to("crm/customers#update", :id => "1") end it "routes to #destroy" do expect(:delete => "/crm/customers/1").to route_to("crm/customers#destroy", :id => "1") end end end