wycats (owner)

Revisions

  • 5361bd Mon Oct 26 23:48:40 -0700 2009
gist: 219371 Download_button fork
public
Public Clone URL: git://gist.github.com/219371.git
Embed All Files: show embed
diff.diff #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
   def test_event_is_parent_based_on_time_frame
- parent = event(:foo, :time => Time.utc(2009), :duration => 10000)
- child = event(:foo, :time => Time.utc(2009, 01, 01, 0, 0, 1), :duration => 1000)
- not_child = event(:foo, :time => Time.utc(2009, 01, 01, 0, 0, 1), :duration => 10000)
+ id = ActiveSupport::SecureRandom.hex(10)
+ time = Time.utc(2009, 01, 01, 0, 0, 1)
+
+ parent = event(:foo, Time.utc(2009), Time.utc(2009) + 100, nil, id, {})
+ child = event(:foo, time, time + 10, nil, id, {})
+ not_child = event(:foo, time, time + 100, nil, id, {})
 
     assert parent.parent_of?(child)
     assert !child.parent_of?(parent)