0003-Ruby-2.4-Fixed-Fixnum-is-deprecated-warning-in-Query.patch

Go MAEDA, 2017-02-28 07:17

Download (2.11 KB)

View differences:

test/unit/query_test.rb
31 31
           :custom_fields_trackers,
32 32
           :workflows
33 33

  
34
  INTEGER_KLASS = RUBY_VERSION >= "2.4" ? Integer : Fixnum
35

  
34 36
  def setup
35 37
    User.current = nil
36 38
  end
......
1579 1581
    count_by_group = q.issue_count_by_group
1580 1582
    assert_kind_of Hash, count_by_group
1581 1583
    assert_equal %w(NilClass User), count_by_group.keys.collect {|k| k.class.name}.uniq.sort
1582
    assert_equal %w(Fixnum), count_by_group.values.collect {|k| k.class.name}.uniq
1584
    assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq
1583 1585
    assert count_by_group.has_key?(User.find(3))
1584 1586
  end
1585 1587

  
......
1588 1590
    count_by_group = q.issue_count_by_group
1589 1591
    assert_kind_of Hash, count_by_group
1590 1592
    assert_equal %w(NilClass String), count_by_group.keys.collect {|k| k.class.name}.uniq.sort
1591
    assert_equal %w(Fixnum), count_by_group.values.collect {|k| k.class.name}.uniq
1593
    assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq
1592 1594
    assert count_by_group.has_key?('MySQL')
1593 1595
  end
1594 1596

  
......
1597 1599
    count_by_group = q.issue_count_by_group
1598 1600
    assert_kind_of Hash, count_by_group
1599 1601
    assert_equal %w(Date NilClass), count_by_group.keys.collect {|k| k.class.name}.uniq.sort
1600
    assert_equal %w(Fixnum), count_by_group.values.collect {|k| k.class.name}.uniq
1602
    assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq
1601 1603
  end
1602 1604

  
1603 1605
  def test_issue_count_with_nil_group_only
1604
-