mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-20 06:01:32 -04:00
planting routing specs to use slug
This commit is contained in:
1 parent
cae9fffea6
commit
3decc69bca
1 file changed
+4
-4
@@ -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