40 lines
1.1 KiB
Ruby
40 lines
1.1 KiB
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe DiningChargesController, type: :routing do
|
|
describe "routing" do
|
|
|
|
it "routes to #index" do
|
|
expect(:get => "/dining_charges").to route_to("dining_charges#index")
|
|
end
|
|
|
|
it "routes to #new" do
|
|
expect(:get => "/dining_charges/new").to route_to("dining_charges#new")
|
|
end
|
|
|
|
it "routes to #show" do
|
|
expect(:get => "/dining_charges/1").to route_to("dining_charges#show", :id => "1")
|
|
end
|
|
|
|
it "routes to #edit" do
|
|
expect(:get => "/dining_charges/1/edit").to route_to("dining_charges#edit", :id => "1")
|
|
end
|
|
|
|
it "routes to #create" do
|
|
expect(:post => "/dining_charges").to route_to("dining_charges#create")
|
|
end
|
|
|
|
it "routes to #update via PUT" do
|
|
expect(:put => "/dining_charges/1").to route_to("dining_charges#update", :id => "1")
|
|
end
|
|
|
|
it "routes to #update via PATCH" do
|
|
expect(:patch => "/dining_charges/1").to route_to("dining_charges#update", :id => "1")
|
|
end
|
|
|
|
it "routes to #destroy" do
|
|
expect(:delete => "/dining_charges/1").to route_to("dining_charges#destroy", :id => "1")
|
|
end
|
|
|
|
end
|
|
end
|