fix-13111-tests.patch

Mizuki ISHIKAWA, 2019-03-20 07:43

Download (1.47 KB)

View differences:

test/unit/mailer_test.rb
450 450
  def test_issue_edit_subject_should_include_status_changes_if_setting_is_enabled
451 451
    with_settings :show_status_changes_in_mail_subject => 1 do
452 452
      issue = Issue.find(2)
453
      issue.status_id = 4
454
      issue.save!
455
      Mailer.deliver_issue_add(issue)
453
      issue.init_journal(User.current)
454
      issue.update(:status_id => 4)
455
      journal = issue.journals.last
456
      Mailer.deliver_issue_edit(journal)
456 457

  
458
      assert journal.new_value_for('status_id')
457 459
      mail = last_email
458 460
      assert_equal "[eCookbook - Feature request #2] (Feedback) Add ingredients categories", mail.subject
459 461
    end
......
462 464
  def test_issue_edit_subject_should_not_include_status_changes_if_setting_is_disabled
463 465
    with_settings :show_status_changes_in_mail_subject => 0 do
464 466
      issue = Issue.find(2)
465
      issue.status_id = 4
466
      issue.save!
467
      Mailer.deliver_issue_add(issue)
467
      issue.init_journal(User.current)
468
      issue.update(:status_id => 4)
469
      journal = issue.journals.last
470
      Mailer.deliver_issue_edit(journal)
468 471

  
472
      assert journal.new_value_for('status_id')
469 473
      mail = last_email
470 474
      assert_equal "[eCookbook - Feature request #2] Add ingredients categories", mail.subject
471 475
    end