##// END OF EJS Templates
test: replace "should_route" of "groups" to "assert_routing" at integration/routing_test.rb...
Toshi MARUYAMA -
r8101:6248689b8906
parent child
Show More
@@ -166,10 +166,17 class RoutingTest < ActionController::IntegrationTest
166 should_route :put, "/enumerations/2", :controller => 'enumerations', :action => 'update', :id => 2
166 should_route :put, "/enumerations/2", :controller => 'enumerations', :action => 'update', :id => 2
167 should_route :delete, "/enumerations/2", :controller => 'enumerations', :action => 'destroy', :id => 2
167 should_route :delete, "/enumerations/2", :controller => 'enumerations', :action => 'destroy', :id => 2
168 end
168 end
169
169
170 context "groups" do
170 def test_groups
171 should_route :post, "/groups/567/users", :controller => 'groups', :action => 'add_users', :id => '567'
171 assert_routing(
172 should_route :delete, "/groups/567/users/12", :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12'
172 { :method => 'post', :path => "/groups/567/users" },
173 { :controller => 'groups', :action => 'add_users', :id => '567' }
174 )
175 assert_routing(
176 { :method => 'delete', :path => "/groups/567/users/12" },
177 { :controller => 'groups', :action => 'remove_user', :id => '567',
178 :user_id => '12' }
179 )
173 end
180 end
174
181
175 def test_issues_rest_actions
182 def test_issues_rest_actions
General Comments 0
You need to be logged in to leave comments. Login now