comparison test/unit/.svn/text-base/issue_status_test.rb.svn-base @ 1:cca12e1c1fd4

* Update to Redmine trunk (SVN revisions 3860-3892)
author Chris Cannam
date Wed, 28 Jul 2010 12:08:28 +0100
parents 513646585e45
children af80e5618e9b
comparison
equal deleted inserted replaced
0:513646585e45 1:cca12e1c1fd4
30 assert status.save 30 assert status.save
31 assert !status.is_default 31 assert !status.is_default
32 end 32 end
33 33
34 def test_destroy 34 def test_destroy
35 count_before = IssueStatus.count
36 status = IssueStatus.find(3) 35 status = IssueStatus.find(3)
37 assert status.destroy 36 assert_difference 'IssueStatus.count', -1 do
38 assert_equal count_before - 1, IssueStatus.count 37 assert status.destroy
38 end
39 assert_nil Workflow.first(:conditions => {:old_status_id => status.id})
40 assert_nil Workflow.first(:conditions => {:new_status_id => status.id})
39 end 41 end
40 42
41 def test_destroy_status_in_use 43 def test_destroy_status_in_use
42 # Status assigned to an Issue 44 # Status assigned to an Issue
43 status = Issue.find(1).status 45 status = Issue.find(1).status