Permalink
Browse files

Small change in routing for execution creation

* config/routes.rb: POST /plans/:plan_id/cases/:test_case_id/executions,
the only difference here is the use of /cases in the url instead of
/test_cases, just to match the use of /cases elsewhere.
* spec/routing/executions_routing_spec.rb: added a routing test for
this.
  • Loading branch information...
1 parent 93c2ed4 commit c5f3be918ff1220dfc80a7b27d55b30751a5ac0a Brian Jones committed Mar 7, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −1 jaribio/config/routes.rb
  2. +3 −0 jaribio/spec/routing/executions_routing_spec.rb
View
@@ -28,7 +28,7 @@
get 'open'
end
- resources :test_cases, :only => [] do
+ resources :test_cases, :path => '/cases', :only => [] do
resources :executions, :only => [:create]
end
end
@@ -7,5 +7,8 @@
get("/executions/1").should route_to("executions#show", :id => "1")
end
+ it "routes to #create" do
+ post("/plans/1/cases/1/executions").should route_to("executions#create", :plan_id => "1", :test_case_id => "1")
+ end
end
end

0 comments on commit c5f3be9

Please sign in to comment.