+ assert_template "history"
+ assert_template :layout => "map"
+ assert_select "h2", :text => "Changesets", :count => 1
+
+ get :list, {:format => "html", :list => '1', :bbox => '-180,-90,90,180'}
+ assert_response :success
+ assert_template "list"
+
+ changesets = Changeset.
+ where("num_changes > 0 and min_lon is not null").
+ order(:created_at => :desc).
+ limit(20)
+ assert changesets.size <= 20
+
+ # Now check that all 20 (or however many were returned) changesets are in the html
+ assert_select "li", :count => changesets.size
+ changesets.each do |changeset|
+ # FIXME this test needs rewriting - test for table contents
+ end
+ end
+
+ ##
+ # This should display the last 20 changesets closed.
+ def test_list_xhr
+ xhr :get, :list, {:format => "html"}
+ assert_response :success
+ assert_template "history"
+ assert_template :layout => "xhr"