Project

General

Profile

Feature #21623 » redmine_3.2.0_21623_test.diff

Jérôme BATAILLE, 2016-04-07 01:06

View differences:

test/functional/issues_controller_test.rb
3213 3213

  
3214 3214
    with_settings :notified_events => %w(issue_updated) do
3215 3215
      assert_difference('Journal.count') do
3216
        assert_difference('JournalDetail.count', 2) do
3216
        # Smile count + 1 #21623
3217
        assert_difference('JournalDetail.count', 3) do
3217 3218
          put :update, :id => 1, :issue => {:project_id => '1',
3218 3219
                                           :tracker_id => '2',
3219 3220
                                           :priority_id => '6'
......
3228 3229
    assert_equal 6, issue.priority_id
3229 3230
    assert_equal 1, issue.category_id
3230 3231

  
3232
    # Smile #21623 custom field value not present anymore because of tracker change
3233
    assert_equal nil, issue.custom_field_value(1)
3234
    last_journal_details = issue.journals.order('id desc').limit(1).first.details
3235
    assert_equal 3, last_journal_details.size
3236

  
3237
    cf_2_journals = last_journal_details.select{|d|
3238
        d.property == 'cf' &&
3239
        d.prop_key == '2' &&
3240
        d.value == nil
3241
      }.collect{|d| d.old_value}
3242
    assert_equal ['125'], cf_2_journals
3243
    # END -- Smile #21623
3244

  
3231 3245
    mail = ActionMailer::Base.deliveries.last
3232 3246
    assert_not_nil mail
3233 3247
    assert mail.subject.starts_with?("[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]")
(3-3/3)