summaryrefslogtreecommitdiff
path: root/spec/routing/project_routing_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-04 18:36:22 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-04 18:36:22 +0300
commitbcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30 (patch)
tree1df3e2d68cd524af4dce107b2e4227778bb3945d /spec/routing/project_routing_spec.rb
parent211e435ade337c968fab11c52427c172adcec99a (diff)
parente0af7cefb4c92b474d14116b40927d70c13e78cc (diff)
downloadgitlab-ce-bcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30.tar.gz
Merge branch 'gist' of https://github.com/Andrew8xx8/gitlabhq into Andrew8xx8-gist
Conflicts: Gemfile.lock app/models/ability.rb app/models/project.rb app/views/snippets/_form.html.haml db/schema.rb features/steps/shared/paths.rb spec/factories.rb spec/models/project_spec.rb
Diffstat (limited to 'spec/routing/project_routing_spec.rb')
-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 f20a1ca51a4..94f9480a4d0 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -258,13 +258,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