diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-09-25 23:10:50 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-09-26 16:32:24 -0400 |
commit | 6cb626ef516a230b2af4e15145488d4c57cd048c (patch) | |
tree | cc67d83ed187708c9dbac705a4e723581f65a473 /spec/routing | |
parent | 8fe63dab52f6e72aaab1141f2af5d72b012064b7 (diff) | |
download | gitlab-ce-6cb626ef516a230b2af4e15145488d4c57cd048c.tar.gz |
Add Compare#index and Compare#create actions
Create just redirects to our specially-formatted #show action
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/project_routing_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 652a75a4ce6..dc687d2a7ac 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -399,12 +399,17 @@ describe TreeController, "routing" do end # project_compare_index GET /:project_id/compare(.:format) compare#index {:id=>/[^\/]+/, :project_id=>/[^\/]+/} +# POST /:project_id/compare(.:format) compare#create {:id=>/[^\/]+/, :project_id=>/[^\/]+/} # project_compare /:project_id/compare/:from...:to(.:format) compare#show {:from=>/.+/, :to=>/.+/, :id=>/[^\/]+/, :project_id=>/[^\/]+/} describe CompareController, "routing" do it "to #index" do get("/gitlabhq/compare").should route_to('compare#index', project_id: 'gitlabhq') end + it "to #compare" do + post("/gitlabhq/compare").should route_to('compare#create', project_id: 'gitlabhq') + end + it "to #show" do get("/gitlabhq/compare/master...stable").should route_to('compare#show', project_id: 'gitlabhq', from: 'master', to: 'stable') get("/gitlabhq/compare/issue/1234...stable").should route_to('compare#show', project_id: 'gitlabhq', from: 'issue/1234', to: 'stable') |