mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-16 12:40:07 -04:00
planting routing specs to use slug
This commit is contained in:
@@ -14,11 +14,11 @@ describe PlantingsController do
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
get("/plantings/1").should route_to("plantings#show", id: "1")
|
||||
get("/plantings/tomato").should route_to("plantings#show", slug: "tomato")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
get("/plantings/1/edit").should route_to("plantings#edit", id: "1")
|
||||
get("/plantings/tomato/edit").should route_to("plantings#edit", slug: "tomato")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
@@ -26,11 +26,11 @@ describe PlantingsController do
|
||||
end
|
||||
|
||||
it "routes to #update" do
|
||||
put("/plantings/1").should route_to("plantings#update", id: "1")
|
||||
put("/plantings/tomato").should route_to("plantings#update", slug: "tomato")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
delete("/plantings/1").should route_to("plantings#destroy", id: "1")
|
||||
delete("/plantings/tomato").should route_to("plantings#destroy", slug: "tomato")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user