fix failing test on timezones and remove debug message

This commit is contained in:
Reinier Balt 2013-09-05 12:23:26 +02:00
parent cb46a8461e
commit fee1e3b504
4 changed files with 6 additions and 5 deletions

View file

@ -20,7 +20,7 @@ class PreferenceTest < ActiveSupport::TestCase
end
def test_parse_date
date = Time.new(2007, 05, 20).in_time_zone(@admin_user.preference.time_zone).at_midnight
date = UserTime.new(@admin_user).midnight(Time.new(2007, 05, 20, 0, 0, 0))
assert_equal date.to_s, @admin_user.preference.parse_date('20/5/2007').to_s
end

View file

@ -1,6 +1,7 @@
require_relative '../minimal_test_helper'
require_relative '../../lib/staleness'
require_relative '../../lib/user_time'
require 'timecop'
class StalenessTest < Test::Unit::TestCase
FakePrefs = Struct.new(:time_zone)
@ -35,7 +36,7 @@ class StalenessTest < Test::Unit::TestCase
def setup
@current_user = FakeUser.new(now)
Timecop.freeze(Time.local(2013,02,28))
Timecop.freeze(Time.utc(2013,02,28))
end
def teardown