tracks/test/fixtures/projects.yml
Matt Rogers fc17a03bc0
Add tests for the new object and fix a bug
Each of the individual query chunks has their own test, in addition to a
test for the full combination of parameters that could influence a
query.

There is also a bugfix for the tag query in here, since I want, as much
as possible, to have passing tests on every commit.
2019-04-11 09:53:53 -05:00

68 lines
1.4 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.beginning_of_day.to_s(:db)
end
def yesterday
1.day.ago.utc.beginning_of_day.to_s(:db)
end
def last_week
1.week.ago.utc.beginning_of_day.to_s(:db)
end
%>
timemachine:
id: 1
name: Build a working time machine
description: ''
position: 1
state: 'active'
user_id: 1
created_at: <%= today %>
updated_at: <%= today %>
default_context_id: 5
moremoney:
id: 2
name: Make more money than Billy Gates
description: ''
position: 2
state: 'active'
user_id: 1
created_at: <%= today %>
updated_at: <%= today %>
last_reviewed: <%= yesterday %>
gardenclean:
id: 3
name: Evict dinosaurs from the garden
description: ''
position: 3
state: 'active'
user_id: 1
created_at: <%= today %>
updated_at: <%= today %>
last_reviewed: <%= last_week %>
attendrailsconf:
id: 4
name: Attend RailsConf
description: ''
position: 1
state: 'active'
user_id: 2
created_at: <%= today %>
updated_at: <%= today %>
attendgophercon:
id: 5
name: Attend Gophercon
description: 'Because those little gopher drawing are cute'
position: 2
state: 'active'
user_id: 2
created_at: <%= today %>
updated_at: <%= today %>