]> source.dussan.org Git - redmine.git/commitdiff
Adds tests for new routes.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 16 Nov 2014 09:01:44 +0000 (09:01 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 16 Nov 2014 09:01:44 +0000 (09:01 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13603 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/routing/members_test.rb
test/integration/routing/principal_memberships_test.rb

index 20de5662b6a43c51637163a57a22dd89432800f6..91a98d40150f195fed1c44288f5068b9c051f0ab 100644 (file)
@@ -35,6 +35,10 @@ class RoutingMembersTest < ActionDispatch::IntegrationTest
         { :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' }
index 017ee1de6901df75c51d8968cb3f4f767ae999ae..4aeed1331793fb87166a5b074975a8430d6309e5 100644 (file)
@@ -19,6 +19,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',
@@ -37,6 +42,11 @@ class RoutingPrincipalMembershipsTest < ActionDispatch::IntegrationTest
   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',