mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-03 06:21:49 +01:00
Made all dates and times stored in UTC in the database and presented according to the User's preferred time zone. Cleaned up old unused preference methods in UserController Restored keyboard shortcuts for date field interaction Aliased preference in User model to prefs for brevity Don't forget to rake db:migrate for this update! All tests pass, but there were a lot of little changes involved in this feature. Please help me test it thoroughly if you're using the trunk. Fixes #349 git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@392 a4c988fc-2ded-0310-b66e-134b36920a42
18 lines
457 B
Ruby
18 lines
457 B
Ruby
require File.dirname(__FILE__) + '/../test_helper'
|
|
|
|
class PreferenceTest < Test::Unit::TestCase
|
|
fixtures :users, :preferences
|
|
|
|
def setup
|
|
assert_equal "test", ENV['RAILS_ENV']
|
|
assert_equal "change-me", Tracks::Config.salt
|
|
@admin_user = User.find(1)
|
|
@other_user = User.find(2)
|
|
end
|
|
|
|
def test_time_zone
|
|
assert_equal 'London', @admin_user.preference.time_zone
|
|
assert_equal @admin_user.preference.tz, TimeZone['London']
|
|
end
|
|
|
|
end
|