{ :method => 'post', :path => "/projects/5234/memberships.xml" },
{ :controller => 'members', :action => 'create', :project_id => '5234', :format => 'xml' }
)
+ assert_routing(
+ { :method => 'get', :path => "/projects/5234/memberships/new" },
+ { :controller => 'members', :action => 'new', :project_id => '5234' }
+ )
assert_routing(
{ :method => 'put', :path => "/memberships/5234" },
{ :controller => 'members', :action => 'update', :id => '5234' }
class RoutingPrincipalMembershipsTest < ActionDispatch::IntegrationTest
def test_user_memberships
+ assert_routing(
+ { :method => 'get', :path => "/users/123/memberships/new" },
+ { :controller => 'principal_memberships', :action => 'new',
+ :user_id => '123' }
+ )
assert_routing(
{ :method => 'post', :path => "/users/123/memberships" },
{ :controller => 'principal_memberships', :action => 'create',
end
def test_group_memberships
+ assert_routing(
+ { :method => 'get', :path => "/groups/123/memberships/new" },
+ { :controller => 'principal_memberships', :action => 'new',
+ :group_id => '123' }
+ )
assert_routing(
{ :method => 'post', :path => "/groups/123/memberships" },
{ :controller => 'principal_memberships', :action => 'create',