Commit e03fd21cba70eb683e961556a2f18327ae0420b1
Committed by
Rafael Manzo
1 parent
35600e42
Exists in
colab
and in
4 other branches
Projects routing
Showing
3 changed files
with
37 additions
and
1 deletions
Show diff stats
config/routes.rb
... | ... | @@ -0,0 +1,33 @@ |
1 | +require "spec_helper" | |
2 | + | |
3 | +describe ProjectsController do | |
4 | + describe "routing" do | |
5 | + it 'should route to #new' do | |
6 | + get('/projects/new').should route_to('projects#new') | |
7 | + end | |
8 | + | |
9 | + it 'should route to #index' do | |
10 | + get('/projects').should route_to('projects#index') | |
11 | + end | |
12 | + | |
13 | + it 'should route to #create' do | |
14 | + post('/projects').should route_to('projects#create') | |
15 | + end | |
16 | + | |
17 | + it 'should route to #show' do | |
18 | + get('/projects/1').should route_to('projects#show', :id => "1") | |
19 | + end | |
20 | + | |
21 | + it 'should route to #edit' do | |
22 | + get('/projects/1/edit').should route_to('projects#edit', :id => "1") | |
23 | + end | |
24 | + | |
25 | + it 'should route to #update' do | |
26 | + put('/projects/1').should route_to('projects#update', :id => "1") | |
27 | + end | |
28 | + | |
29 | + it 'should route to #destroy' do | |
30 | + delete('/projects/1').should route_to('projects#destroy', :id => "1") | |
31 | + end | |
32 | + end | |
33 | +end | |
0 | 34 | \ No newline at end of file | ... | ... |