Skip to content

Commit

Permalink
Small change in routing for execution creation
Browse files Browse the repository at this point in the history
* 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
Brian Jones committed Mar 7, 2012
1 parent 93c2ed4 commit c5f3be9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jaribio/config/routes.rb
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions jaribio/spec/routing/executions_routing_spec.rb
Expand Up @@ -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.