Add/remove issue watchers via the REST API (#6727).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11290 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-01-30 20:51:21 +00:00
parent f2fd78f7b8
commit a0158eff96
5 changed files with 82 additions and 6 deletions
+10
View File
@@ -47,5 +47,15 @@ class RoutingWatchersTest < ActionController::IntegrationTest
{ :method => 'post', :path => "/watchers/unwatch" },
{ :controller => 'watchers', :action => 'unwatch' }
)
assert_routing(
{ :method => 'post', :path => "/issues/12/watchers.xml" },
{ :controller => 'watchers', :action => 'create',
:object_type => 'issue', :object_id => '12', :format => 'xml' }
)
assert_routing(
{ :method => 'delete', :path => "/issues/12/watchers/3.xml" },
{ :controller => 'watchers', :action => 'destroy',
:object_type => 'issue', :object_id => '12', :user_id => '3', :format => 'xml'}
)
end
end