diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-11-07 08:44:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-11-07 08:44:56 +0000 |
commit | 3b9d8c2a72f64b451db700e2d3dba6bb46e070af (patch) | |
tree | 4db756203661e2492a383f68b0e48719c0094068 /test/functional/issue_relations_controller_test.rb | |
parent | 6245f49934d2f2444d4313a800c14e17931f8c0b (diff) | |
download | redmine-3b9d8c2a72f64b451db700e2d3dba6bb46e070af.tar.gz redmine-3b9d8c2a72f64b451db700e2d3dba6bb46e070af.zip |
Adds a few functional tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3013 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issue_relations_controller_test.rb')
-rw-r--r-- | test/functional/issue_relations_controller_test.rb | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/test/functional/issue_relations_controller_test.rb b/test/functional/issue_relations_controller_test.rb index 85661749f..cd7af4eb9 100644 --- a/test/functional/issue_relations_controller_test.rb +++ b/test/functional/issue_relations_controller_test.rb @@ -13,6 +13,7 @@ class IssueRelationsControllerTest < ActionController::TestCase :member_roles, :issues, :issue_statuses, + :issue_relations, :enabled_modules, :enumerations, :trackers @@ -31,13 +32,6 @@ class IssueRelationsControllerTest < ActionController::TestCase ) end - def test_destroy_routing - assert_recognizes( #TODO: use DELETE on issue URI - {:controller => 'issue_relations', :action => 'destroy', :issue_id => '1', :id => '23'}, - {:method => :post, :path => '/issues/1/relations/23/destroy'} - ) - end - def test_new assert_difference 'IssueRelation.count' do @request.session[:user_id] = 3 @@ -56,4 +50,18 @@ class IssueRelationsControllerTest < ActionController::TestCase :relation => {:issue_to_id => '4', :relation_type => 'relates', :delay => ''} end end + + def test_destroy_routing + assert_recognizes( #TODO: use DELETE on issue URI + {:controller => 'issue_relations', :action => 'destroy', :issue_id => '1', :id => '23'}, + {:method => :post, :path => '/issues/1/relations/23/destroy'} + ) + end + + def test_destroy + assert_difference 'IssueRelation.count', -1 do + @request.session[:user_id] = 3 + post :destroy, :id => '2', :issue_id => '3' + end + end end |