summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-09-25 23:10:50 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-09-26 16:32:24 -0400
commit6cb626ef516a230b2af4e15145488d4c57cd048c (patch)
treecc67d83ed187708c9dbac705a4e723581f65a473 /spec/routing
parent8fe63dab52f6e72aaab1141f2af5d72b012064b7 (diff)
downloadgitlab-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.rb5
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')