summaryrefslogtreecommitdiffstats
path: root/test/integration/routing
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-16 09:01:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-16 09:01:44 +0000
commitcd6b2f2268d3e02ae652d3ad37f02170e3647a72 (patch)
tree5c3a8bcba8bc7a88c063e5b7645442227010c909 /test/integration/routing
parent1508cd7b8bf9dbc8ef22b6febd1047455c3c72cd (diff)
downloadredmine-cd6b2f2268d3e02ae652d3ad37f02170e3647a72.tar.gz
redmine-cd6b2f2268d3e02ae652d3ad37f02170e3647a72.zip
Adds tests for new routes.
git-svn-id: http://svn.redmine.org/redmine/trunk@13603 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing')
-rw-r--r--test/integration/routing/members_test.rb4
-rw-r--r--test/integration/routing/principal_memberships_test.rb10
2 files changed, 14 insertions, 0 deletions
diff --git a/test/integration/routing/members_test.rb b/test/integration/routing/members_test.rb
index 20de5662b..91a98d401 100644
--- a/test/integration/routing/members_test.rb
+++ b/test/integration/routing/members_test.rb
@@ -36,6 +36,10 @@ class RoutingMembersTest < ActionDispatch::IntegrationTest
{ :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' }
)
diff --git a/test/integration/routing/principal_memberships_test.rb b/test/integration/routing/principal_memberships_test.rb
index 017ee1de6..4aeed1331 100644
--- a/test/integration/routing/principal_memberships_test.rb
+++ b/test/integration/routing/principal_memberships_test.rb
@@ -20,6 +20,11 @@ require File.expand_path('../../../test_helper', __FILE__)
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',
:user_id => '123' }
@@ -38,6 +43,11 @@ class RoutingPrincipalMembershipsTest < ActionDispatch::IntegrationTest
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',
:group_id => '123' }