tracks/test/fixtures/todos.yml
2025-06-29 13:25:14 +03:00

290 lines
5.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 yesterday
Time.zone.now.utc.beginning_of_day - 1.day
end
def today
Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
end
def tomorrow
(Time.zone.now.utc.beginning_of_day + 1.day).to_formatted_s(:db)
end
def next_week
1.week.from_now.utc.beginning_of_day.to_formatted_s(:db)
end
def last_week
1.week.ago.utc.beginning_of_day.to_formatted_s(:db)
end
def two_weeks_ago
2.weeks.ago.utc.beginning_of_day.to_formatted_s(:db)
end
def two_weeks_hence
2.weeks.from_now.utc.beginning_of_day.to_formatted_s(:db)
end
%>
call_bill:
id: 1
context_id: 1
project_id: 2
description: Call Bill Gates to find out how much he makes per day
notes: ~
state: active
created_at: <%= last_week %>
due: <%= two_weeks_hence %>
completed_at: ~
user_id: 1
call_dino_ext:
id: 2
context_id: 2
project_id: 3
description: Call dinosaur exterminator
notes: Ask him if I need to hire a skip for the corpses.
state: active
created_at: <%= today %>
due: <%= two_weeks_hence %>
completed_at: ~
user_id: 1
buy_milk:
id: 3
context_id: 4
project_id: ~
description: Buy milk
notes: ~
state: completed
created_at: <%= today %>
due: ~
completed_at: <%= today %>
user_id: 1
buy_bread:
id: 4
context_id: 4
project_id: ~
description: Buy bread
notes: ~
state: completed
created_at: <%= today %>
due: ~
completed_at: <%= today %>
user_id: 1
construct_dilation_device:
id: 5
context_id: 5
project_id: 1
description: Construct time dilation device
notes: ~
state: active
created_at: <%= today %>
due: ~
completed_at: ~
user_id: 1
phone_grandfather:
id: 6
context_id: 2
project_id: 1
description: Phone Grandfather to ask about the paradox
notes: Added some _notes_.
state: active
created_at: <%= today %>
due: <%= last_week %>
completed_at: ~
user_id: 1
book:
id: 7
context_id: 6
project_id: 3
description: Get a book out of the library
notes: 'Dinosaurs''R'
state: active
created_at: <%= today %>
due: ~
completed_at: ~
user_id: 1
upgrade_rails:
id: 8
context_id: 4
project_id: ~
description: Upgrade to Rails 0.9.1
notes: ~
state: completed
created_at: <%= today %>
due: <%= today %>
completed_at: <%= today %>
user_id: 1
due_today:
id: 9
context_id: 1
project_id: ~
description: This should be due today
notes: ~
state: active
created_at: <%= today %>
due: <%= today %>
completed_at: ~
user_id: 1
foo:
id: 10
context_id: 1
project_id: ~
description: foo
notes: ~
state: completed
created_at: <%= two_weeks_ago %>
due: <%= two_weeks_hence %>
completed_at: <%= last_week %>
user_id: 1
buy_shares:
id: 11
context_id: 1
project_id: 2
description: Buy shares
notes: ~
state: active
created_at: <%= today %>
due: <%= next_week %>
completed_at: ~
user_id: 1
buy_stego_bait:
id: 12
context_id: 1
project_id: 3
description: Buy stegosaurus bait
notes: ~
state: active
created_at: <%= today %>
due: <%= next_week %>
completed_at: ~
user_id: 1
new_action_in_context:
id: 13
context_id: 1
project_id: 3
description: New action in context
notes: Some notes
state: active
created_at: <%= today %>
due: <%= next_week %>
completed_at: ~
user_id: 1
call_stock_broker:
id: 14
context_id: 2
project_id: 2
description: Call stock broker
notes: 'tel: 12345'
state: active
created_at: <%= last_week %>
due: ~
completed_at: ~
user_id: 1
select_delorean_model:
id: 15
context_id: 6
project_id: 1
description: Select Delorean model
notes: ~
state: deferred
created_at: <%= today %>
due: ~
completed_at: ~
show_from: <%= next_week %>
user_id: 1
buy_tix:
id: 16
context_id: 10
project_id: 4
description: Buy tix
notes: ~
state: active
created_at: <%= today %>
due: ~
completed_at: ~
show_from: <%= next_week %>
user_id: 2
pal_confirmation:
id: 17
context_id: 11
project_id: 4
description: Confirmation from pal
notes: ~
state: active
created_at: <%= today %>
due: ~
completed_at: ~
show_from: <%= next_week %>
user_id: 2
call_bill_gates_every_day:
id: 18
user_id: 1
context_id: 1
project_id: 2
description: Call Bill Gates every day
notes: ~
state: active
created_at: <%= last_week %>
due: <%= last_week %>
completed_at: ~
show_from: ~
recurring_todo_id: 1
email_broker:
id: 19
user_id: 1
context_id: 3
description: Ask about better stocks
notes: ~
state: pending
package_delivered:
id: 20
context_id: 11
project_id: 5
description: Package delivery date
notes: ~
state: active
created_at: <%= two_weeks_ago %>
due: <%= today %>
completed_at: ~
show_from: ~
user_id: 2
assemble_furniture:
id: 21
context_id: 11
project_id: 5
description: Put together the furniture we bought
notes: ~
state: completed
created_at: <%= two_weeks_ago %>
due: <%= today %>
completed_at: <%= yesterday %>
show_from: ~
user_id: 2