Project

General

Profile

Defect #30474 ยป fix-30474.diff

Go MAEDA, 2019-01-22 02:57

View differences:

test/fixtures/issues.yml (working copy)
15 15
  status_id: 1
16 16
  start_date: <%= 1.day.ago.to_date.to_s(:db) %>
17 17
  due_date: <%= 10.day.from_now.to_date.to_s(:db) %>
18
  estimated_hours: 200.0
18 19
  root_id: 1
19 20
  lft: 1
20 21
  rgt: 2
......
36 37
  start_date: <%= 2.day.ago.to_date.to_s(:db) %>
37 38
  due_date:
38 39
  root_id: 2
40
  estimated_hours: 0.5
39 41
  lft: 1
40 42
  rgt: 2
41 43
  lock_version: 3
......
56 58
  status_id: 1
57 59
  start_date: <%= 15.day.ago.to_date.to_s(:db) %>
58 60
  due_date: <%= 5.day.ago.to_date.to_s(:db) %>
61
  estimated_hours: 1.0
59 62
  root_id: 3
60 63
  lft: 1
61 64
  rgt: 2
......
90 93
  assigned_to_id:
91 94
  author_id: 2
92 95
  status_id: 1
96
  estimated_hours: 2.0
93 97
  root_id: 5
94 98
  lft: 1
95 99
  rgt: 2
test/functional/issues_controller_test.rb (working copy)
1067 1067
      }
1068 1068
    assert_response :success
1069 1069
    hours = issues_in_list.map(&:total_estimated_hours)
1070
    # Removes nil because the position of NULL is database dependent
1071
    hours.compact!
1070 1072
    assert_equal hours.sort.reverse, hours
1071 1073
  end
1072 1074

  
    (1-1/1)