# Check that the index of traces is displayed
def test_index
user = create(:user)
- # The fourth test below is surpisingly sensitive to timestamp ordering when the timestamps are equal.
+ # The fourth test below is surprisingly sensitive to timestamp ordering when the timestamps are equal.
trace_a = create(:trace, :visibility => "public", :timestamp => 4.seconds.ago) do |trace|
create(:tracetag, :trace => trace, :tag => "London")
end
# Check the RSS feed
def test_rss
user = create(:user)
- # The fourth test below is surpisingly sensitive to timestamp ordering when the timestamps are equal.
+ # The fourth test below is surprisingly sensitive to timestamp ordering when the timestamps are equal.
trace_a = create(:trace, :visibility => "public", :timestamp => 4.seconds.ago) do |trace|
create(:tracetag, :trace => trace, :tag => "London")
end
assert_select "tr", :count => traces.length do |rows|
traces.zip(rows).each do |trace, row|
assert_select row, "a", Regexp.new(Regexp.escape(trace.name))
- assert_select row, "span", Regexp.new(Regexp.escape("#{trace.size} points")) if trace.inserted?
+ assert_select row, "li", Regexp.new(Regexp.escape("#{trace.size} points")) if trace.inserted?
assert_select row, "td", Regexp.new(Regexp.escape(trace.description))
assert_select row, "td", Regexp.new(Regexp.escape("by #{trace.user.display_name}"))
end