@@ -36,6 +36,10 class RoutingMembersTest < ActionDispatch::IntegrationTest | |||||
36 | { :controller => 'members', :action => 'create', :project_id => '5234', :format => 'xml' } |
|
36 | { :controller => 'members', :action => 'create', :project_id => '5234', :format => 'xml' } | |
37 | ) |
|
37 | ) | |
38 | assert_routing( |
|
38 | assert_routing( | |
|
39 | { :method => 'get', :path => "/projects/5234/memberships/new" }, | |||
|
40 | { :controller => 'members', :action => 'new', :project_id => '5234' } | |||
|
41 | ) | |||
|
42 | assert_routing( | |||
39 | { :method => 'put', :path => "/memberships/5234" }, |
|
43 | { :method => 'put', :path => "/memberships/5234" }, | |
40 | { :controller => 'members', :action => 'update', :id => '5234' } |
|
44 | { :controller => 'members', :action => 'update', :id => '5234' } | |
41 | ) |
|
45 | ) |
@@ -20,6 +20,11 require File.expand_path('../../../test_helper', __FILE__) | |||||
20 | class RoutingPrincipalMembershipsTest < ActionDispatch::IntegrationTest |
|
20 | class RoutingPrincipalMembershipsTest < ActionDispatch::IntegrationTest | |
21 | def test_user_memberships |
|
21 | def test_user_memberships | |
22 | assert_routing( |
|
22 | assert_routing( | |
|
23 | { :method => 'get', :path => "/users/123/memberships/new" }, | |||
|
24 | { :controller => 'principal_memberships', :action => 'new', | |||
|
25 | :user_id => '123' } | |||
|
26 | ) | |||
|
27 | assert_routing( | |||
23 | { :method => 'post', :path => "/users/123/memberships" }, |
|
28 | { :method => 'post', :path => "/users/123/memberships" }, | |
24 | { :controller => 'principal_memberships', :action => 'create', |
|
29 | { :controller => 'principal_memberships', :action => 'create', | |
25 | :user_id => '123' } |
|
30 | :user_id => '123' } | |
@@ -38,6 +43,11 class RoutingPrincipalMembershipsTest < ActionDispatch::IntegrationTest | |||||
38 |
|
43 | |||
39 | def test_group_memberships |
|
44 | def test_group_memberships | |
40 | assert_routing( |
|
45 | assert_routing( | |
|
46 | { :method => 'get', :path => "/groups/123/memberships/new" }, | |||
|
47 | { :controller => 'principal_memberships', :action => 'new', | |||
|
48 | :group_id => '123' } | |||
|
49 | ) | |||
|
50 | assert_routing( | |||
41 | { :method => 'post', :path => "/groups/123/memberships" }, |
|
51 | { :method => 'post', :path => "/groups/123/memberships" }, | |
42 | { :controller => 'principal_memberships', :action => 'create', |
|
52 | { :controller => 'principal_memberships', :action => 'create', | |
43 | :group_id => '123' } |
|
53 | :group_id => '123' } |
General Comments 0
You need to be logged in to leave comments.
Login now