Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-03-23 23:13:51 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-03-23 23:17:25 +0400
commitb49cfbc1d54b6cfa674ba803b3a90fb81c609c8b (patch)
treef3bbb846ae9881b33e238585e1d72ea5e668d689 /spec/routing
parentcc869d5dc101ea1175e308d8532064f06072d08b (diff)
Project snippets moved to /projects
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/project_routing_spec.rb32
1 files changed, 28 insertions, 4 deletions
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index 41533f8b4fe..059abe14961 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -249,13 +249,37 @@ end
# project_snippet GET /:project_id/snippets/:id(.:format) snippets#show
# PUT /:project_id/snippets/:id(.:format) snippets#update
# DELETE /:project_id/snippets/:id(.:format) snippets#destroy
-describe SnippetsController, "routing" do
+describe Project::SnippetsController, "routing" do
it "to #raw" do
- get("/gitlabhq/snippets/1/raw").should route_to('snippets#raw', project_id: 'gitlabhq', id: '1')
+ get("/gitlabhq/snippets/1/raw").should route_to('projects/snippets#raw', project_id: 'gitlabhq', id: '1')
end
- it_behaves_like "RESTful project resources" do
- let(:controller) { 'snippets' }
+ it "to #index" do
+ get("/gitlabhq/snippets").should route_to("projects/snippets#index", project_id: 'gitlabhq')
+ end
+
+ it "to #create" do
+ post("/gitlabhq/snippets").should route_to("projects/snippets#create", project_id: 'gitlabhq')
+ end
+
+ it "to #new" do
+ get("/gitlabhq/snippets/new").should route_to("projects/snippets#new", project_id: 'gitlabhq')
+ end
+
+ it "to #edit" do
+ get("/gitlabhq/snippets/1/edit").should route_to("projects/snippets#edit", project_id: 'gitlabhq', id: '1')
+ end
+
+ it "to #show" do
+ get("/gitlabhq/snippets/1").should route_to("projects/snippets#show", project_id: 'gitlabhq', id: '1')
+ end
+
+ it "to #update" do
+ put("/gitlabhq/snippets/1").should route_to("projects/snippets#update", project_id: 'gitlabhq', id: '1')
+ end
+
+ it "to #destroy" do
+ delete("/gitlabhq/snippets/1").should route_to("projects/snippets#destroy", project_id: 'gitlabhq', id: '1')
end
end