mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
There were several problems: * Time.now returns the systems time, not the users time * fixtures do not translate dates from timezone to utc, but stores the date verbatim * calling a controller will set the timezone to the preference of the current_user. So it could be changed while you do not realize this. I fixed the failing test, but problems could be elsewhere
136 lines
2.1 KiB
YAML
136 lines
2.1 KiB
YAML
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
|
|
|
# Please note that dates in yml are not converted to utc timezone like
|
|
# rails does automatically in models or controllers! Convert to utc manually!
|
|
<%
|
|
|
|
def today
|
|
Time.zone.now.utc.to_s(:db)
|
|
end
|
|
|
|
%>
|
|
agenda:
|
|
id: 1
|
|
name: agenda
|
|
position: 1
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
call:
|
|
id: 2
|
|
name: call
|
|
position: 2
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
email:
|
|
id: 3
|
|
name: email
|
|
position: 3
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
errand:
|
|
id: 4
|
|
name: errand
|
|
position: 4
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
lab:
|
|
id: 5
|
|
name: lab
|
|
position: 5
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
library:
|
|
id: 6
|
|
name: library
|
|
position: 6
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
freetime:
|
|
id: 7
|
|
name: freetime
|
|
position: 7
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
office:
|
|
id: 8
|
|
name: office
|
|
position: 8
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
waitingfor:
|
|
id: 9
|
|
name: waiting for
|
|
position: 9
|
|
state: active
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
office_otheruser:
|
|
id: 10
|
|
name: office
|
|
position: 1
|
|
state: active
|
|
user_id: 2
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
waitingfor_otheruser:
|
|
id: 11
|
|
name: waiting for
|
|
position: 2
|
|
state: active
|
|
user_id: 2
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
someday_maybe:
|
|
id: 12
|
|
name: someday maybe
|
|
position: 10
|
|
state: hidden
|
|
user_id: 1
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
inbox:
|
|
id: 13
|
|
name: Inbox
|
|
position: 1
|
|
state: active
|
|
user_id: 4
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|
|
|
|
anothercontext:
|
|
id: 14
|
|
name: anothercontext
|
|
position: 2
|
|
state: active
|
|
user_id: 4
|
|
created_at: <%= today %>
|
|
updated_at: <%= today %>
|