summaryrefslogtreecommitdiffstats
path: root/test/integration/routing
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-30 20:51:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-30 20:51:21 +0000
commita0158eff9643b836488bf40667669d07d8653429 (patch)
tree3bdf34a6bb3e2ad3114f3e0d3deaa371d5716abb /test/integration/routing
parentf2fd78f7b868c184e4ab2058e41a27043640843a (diff)
downloadredmine-a0158eff9643b836488bf40667669d07d8653429.tar.gz
redmine-a0158eff9643b836488bf40667669d07d8653429.zip
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
Diffstat (limited to 'test/integration/routing')
-rw-r--r--test/integration/routing/watchers_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/routing/watchers_test.rb b/test/integration/routing/watchers_test.rb
index 1b8b629b7..3c203f4bc 100644
--- a/test/integration/routing/watchers_test.rb
+++ b/test/integration/routing/watchers_test.rb
@@ -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