-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I would like to write a spec for this routes.rb:
resources :examples, constraints: { id: /[0-9]+/ } do
member do
post :save, constraints: CommitParamRouting.new("Save"), action: :save
end
endBut I can't figure out how. My current attempt in examples_routing_spec.rb looks like this, but its not working:
RSpec.describe ExamplesController, :type => :routing do
describe "routing" do
it "routes to #save" do
expect(:post => "/example/1/save", "commit" => "Save" ).to route_to("example#save", :id => "1")
end
end
endAny ideas?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels