Mercurial > hg > soundsoftware-site
comparison test/functional/issue_moves_controller_test.rb @ 442:753f1380d6bc cannam
Merge from branch "redmine-1.2"
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:41:04 +0100 |
parents | cbce1fd3b1b7 |
children | cbb26bc654de |
comparison
equal
deleted
inserted
replaced
252:adc8466df404 | 442:753f1380d6bc |
---|---|
110 assert_equal 3, issue.status_id, "Status is incorrect" | 110 assert_equal 3, issue.status_id, "Status is incorrect" |
111 assert_equal '2009-12-01', issue.start_date.to_s, "Start date is incorrect" | 111 assert_equal '2009-12-01', issue.start_date.to_s, "Start date is incorrect" |
112 assert_equal '2009-12-31', issue.due_date.to_s, "Due date is incorrect" | 112 assert_equal '2009-12-31', issue.due_date.to_s, "Due date is incorrect" |
113 end | 113 end |
114 end | 114 end |
115 | |
116 should "allow adding a note when copying" do | |
117 @request.session[:user_id] = 2 | |
118 assert_difference 'Issue.count', 1 do | |
119 post :create, :ids => [1], :copy_options => {:copy => '1'}, :notes => 'Copying one issue', :new_tracker_id => '', :assigned_to_id => 4, :status_id => 3, :start_date => '2009-12-01', :due_date => '2009-12-31' | |
120 end | |
121 | |
122 issue = Issue.first(:order => 'id DESC') | |
123 assert_equal 1, issue.journals.size | |
124 journal = issue.journals.first | |
125 assert_equal 0, journal.details.size | |
126 assert_equal 'Copying one issue', journal.notes | |
127 end | |
115 end | 128 end |
116 | 129 |
117 def test_copy_to_another_project_should_follow_when_needed | 130 def test_copy_to_another_project_should_follow_when_needed |
118 @request.session[:user_id] = 2 | 131 @request.session[:user_id] = 2 |
119 post :create, :ids => [1], :new_project_id => 2, :copy_options => {:copy => '1'}, :follow => '1' | 132 post :create, :ids => [1], :new_project_id => 2, :copy_options => {:copy => '1'}, :follow => '1' |