Commit 7ed7d525004e6ebab67badeaf3d7507ae8ecf756
1 parent
28df3e68
Exists in
colab
and in
4 other branches
Repositores routing specs
Showing
1 changed file
with
14 additions
and
1 deletions
Show diff stats
spec/routing/repositories_routing_spec.rb
| ... | ... | @@ -2,6 +2,19 @@ require "spec_helper" |
| 2 | 2 | |
| 3 | 3 | describe RepositoriesController do |
| 4 | 4 | describe "routing" do |
| 5 | - pending "add some examples to (or delete) #{__FILE__}" | |
| 5 | + it { should route(:post, '/projects/1/repositories'). | |
| 6 | + to(controller: :repositories, action: :create, project_id: 1) } | |
| 7 | + it { should route(:get, '/projects/1/repositories/new'). | |
| 8 | + to(controller: :repositories, action: :new, project_id: 1) } | |
| 9 | + it { should route(:get, '/projects/1/repositories/1/edit'). | |
| 10 | + to(controller: :repositories, action: :edit, project_id: 1, id: 1) } | |
| 11 | + it { should route(:get, '/projects/1/repositories/1'). | |
| 12 | + to(controller: :repositories, action: :show, project_id: 1, id: 1) } | |
| 13 | + it { should route(:delete, '/projects/1/repositories/1'). | |
| 14 | + to(controller: :repositories, action: :destroy, project_id: 1, id: 1) } | |
| 15 | + it { should route(:put, '/projects/1/repositories/1'). | |
| 16 | + to(controller: :repositories, action: :update, project_id: 1, id: 1) } | |
| 17 | + it { should_not route(:get, '/projects/1/repositories'). | |
| 18 | + to(controller: :repositories, action: :index, project_id: 1) } | |
| 6 | 19 | end |
| 7 | 20 | end | ... | ... |