Routes added under resource collection should be prefixed with
resource collection name
This commit is contained in:
parent
1fc58a889d
commit
3d91d7f0a2
@ -369,7 +369,7 @@ def collection
|
||||
end
|
||||
|
||||
with_scope_level(:collection) do
|
||||
scope(:name_prefix => parent_resource.member_name, :as => "") do
|
||||
scope(:name_prefix => parent_resource.collection_name, :as => "") do
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
@ -236,10 +236,7 @@ def test_projects_participants
|
||||
|
||||
put '/projects/1/participants/update_all'
|
||||
assert_equal 'participants#update_all', @response.body
|
||||
|
||||
pending do
|
||||
assert_equal '/projects/1/participants/update_all', update_all_project_participants_path(:project_id => '1')
|
||||
end
|
||||
assert_equal '/projects/1/participants/update_all', update_all_project_participants_path(:project_id => '1')
|
||||
end
|
||||
end
|
||||
|
||||
@ -309,15 +306,11 @@ def test_projects_posts
|
||||
|
||||
get '/projects/1/posts/archive'
|
||||
assert_equal 'posts#archive', @response.body
|
||||
pending do
|
||||
assert_equal '/projects/1/posts/archive', archive_project_posts_path(:project_id => '1')
|
||||
end
|
||||
assert_equal '/projects/1/posts/archive', archive_project_posts_path(:project_id => '1')
|
||||
|
||||
get '/projects/1/posts/toggle_view'
|
||||
assert_equal 'posts#toggle_view', @response.body
|
||||
pending do
|
||||
assert_equal '/projects/1/posts/toggle_view', toggle_view_project_posts_path(:project_id => '1')
|
||||
end
|
||||
assert_equal '/projects/1/posts/toggle_view', toggle_view_project_posts_path(:project_id => '1')
|
||||
|
||||
post '/projects/1/posts/1/preview'
|
||||
assert_equal 'posts#preview', @response.body
|
||||
@ -333,9 +326,7 @@ def test_projects_posts
|
||||
|
||||
post '/projects/1/posts/1/comments/preview'
|
||||
assert_equal 'comments#preview', @response.body
|
||||
pending do
|
||||
assert_equal '/projects/1/posts/1/comments/preview', preview_project_post_comments_path(:project_id => '1', :post_id => '1')
|
||||
end
|
||||
assert_equal '/projects/1/posts/1/comments/preview', preview_project_post_comments_path(:project_id => '1', :post_id => '1')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user