@@ -96,13 +96,31 class RoutingTest < ActionController::IntegrationTest | |||
|
96 | 96 | ) |
|
97 | 97 | end |
|
98 | 98 | |
|
99 |
|
|
|
100 | should_route :get, "/custom_fields", :controller => 'custom_fields', :action => 'index' | |
|
101 | should_route :get, "/custom_fields/new", :controller => 'custom_fields', :action => 'new' | |
|
102 |
|
|
|
103 | should_route :get, "/custom_fields/2/edit", :controller => 'custom_fields', :action => 'edit', :id => 2 | |
|
104 | should_route :put, "/custom_fields/2", :controller => 'custom_fields', :action => 'update', :id => 2 | |
|
105 | should_route :delete, "/custom_fields/2", :controller => 'custom_fields', :action => 'destroy', :id => 2 | |
|
99 | def test_custom_fields | |
|
100 | assert_routing( | |
|
101 | { :method => 'get', :path => "/custom_fields" }, | |
|
102 | { :controller => 'custom_fields', :action => 'index' } | |
|
103 | ) | |
|
104 | assert_routing( | |
|
105 | { :method => 'get', :path => "/custom_fields/new" }, | |
|
106 | { :controller => 'custom_fields', :action => 'new' } | |
|
107 | ) | |
|
108 | assert_routing( | |
|
109 | { :method => 'post', :path => "/custom_fields" }, | |
|
110 | { :controller => 'custom_fields', :action => 'create' } | |
|
111 | ) | |
|
112 | assert_routing( | |
|
113 | { :method => 'get', :path => "/custom_fields/2/edit" }, | |
|
114 | { :controller => 'custom_fields', :action => 'edit', :id => '2' } | |
|
115 | ) | |
|
116 | assert_routing( | |
|
117 | { :method => 'put', :path => "/custom_fields/2" }, | |
|
118 | { :controller => 'custom_fields', :action => 'update', :id => '2' } | |
|
119 | ) | |
|
120 | assert_routing( | |
|
121 | { :method => 'delete', :path => "/custom_fields/2" }, | |
|
122 | { :controller => 'custom_fields', :action => 'destroy', :id => '2' } | |
|
123 | ) | |
|
106 | 124 | end |
|
107 | 125 | |
|
108 | 126 | context "documents" do |
General Comments 0
You need to be logged in to leave comments.
Login now