31881-v2.patch

Go MAEDA, 2020-07-05 05:44

Download (1.09 KB)

View differences:

app/models/issue.rb
1390 1390
    s << ' child' if child?
1391 1391
    s << ' parent' unless leaf?
1392 1392
    s << ' private' if is_private?
1393
    s << ' behind-schedule' if behind_schedule?
1393 1394
    if user.logged?
1394 1395
      s << ' created-by-me' if author_id == user.id
1395 1396
      s << ' assigned-to-me' if assigned_to_id == user.id
test/unit/issue_test.rb
3021 3021
    assert_include 'assigned-to-me', issue2.css_classes(user)
3022 3022
  end
3023 3023

  
3024
  def test_css_classes_behind_schedule
3025
    assert_include 'behind-schedule', Issue.find(1).css_classes.split(' ')
3026
    assert_not_include 'behind-schedule', Issue.find(2).css_classes.split(' ')
3027
  end
3028

  
3024 3029
  def test_save_attachments_with_hash_should_save_attachments_in_keys_order
3025 3030
    set_tmp_attachments_directory
3026 3031
    issue = Issue.generate!