require "spec_helper" describe Flyboy::TasksController, type: :routing do describe "routing" do routes { Flyboy::Engine.routes } it "routes to #index" do get("/tasks").should route_to("flyboy/tasks#index") end it "routes to #new" do get("/tasks/new").should_not route_to("flyboy/tasks#new") end it "routes to #show" do get("/tasks/1").should route_to("flyboy/tasks#show", :id => "1") end it "routes to #edit" do get("/tasks/1/edit").should route_to("flyboy/tasks#edit", :id => "1") end it "routes to #create" do post("/tasks").should route_to("flyboy/tasks#create") end it "routes to #update" do patch("/tasks/1").should route_to("flyboy/tasks#update", :id => "1") end it "routes to #complete" do patch("/tasks/1/complete").should route_to("flyboy/tasks#complete", :id => "1") end it "routes to #snooze" do patch("/tasks/1/snooze").should route_to("flyboy/tasks#snooze", :id => "1") end it "routes to #destroy" do delete("/tasks/1").should route_to("flyboy/tasks#destroy", :id => "1") end end end