• Mehmet Emin INAC's avatar
    Fix flaky tests on historical vulnerability statistic specs · 4e1f2606
    Mehmet Emin INAC authored
    There were two problems with the previous specs;
    
    1) They tended to fail at runs around midnight
    2) `Date.today` does not respect to time zone configuration of Rails
    which makes it incompatible with the value of `Time.zone.now` which is
    used by Rails internally
    
    Mocking time and using `Date.current` which respects the time zone
    fixes the above issues.
    4e1f2606
historical_statistics.rb 221 Bytes