diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-07-25 10:48:27 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-07-25 10:48:27 +0000 |
commit | c47d23a87be4e9de873d57ec2b843e8e7efc2caa (patch) | |
tree | 3543410323667da8b42d26c93229b274bce3673f /test/unit/issue_status_test.rb | |
parent | 73d936803975a2f8edae1a3a2c4f7ae3943fde19 (diff) | |
download | redmine-c47d23a87be4e9de873d57ec2b843e8e7efc2caa.tar.gz redmine-c47d23a87be4e9de873d57ec2b843e8e7efc2caa.zip |
Fixed: Deleting statuses doesn't delete all workflow entries (#5811).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3881 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_status_test.rb')
-rw-r--r-- | test/unit/issue_status_test.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/unit/issue_status_test.rb b/test/unit/issue_status_test.rb index 2c0685cec..bcc50a480 100644 --- a/test/unit/issue_status_test.rb +++ b/test/unit/issue_status_test.rb @@ -32,10 +32,12 @@ class IssueStatusTest < ActiveSupport::TestCase end def test_destroy - count_before = IssueStatus.count status = IssueStatus.find(3) - assert status.destroy - assert_equal count_before - 1, IssueStatus.count + assert_difference 'IssueStatus.count', -1 do + assert status.destroy + end + assert_nil Workflow.first(:conditions => {:old_status_id => status.id}) + assert_nil Workflow.first(:conditions => {:new_status_id => status.id}) end def test_destroy_status_in_use |