assert_template "history"
assert_template :layout => "map"
assert_select "h2", :text => "Changesets", :count => 1
+ assert_select "link[rel='alternate'][type='application/atom+xml']", :count => 1 do
+ assert_select "[href=?]", "http://www.example.com/history/feed"
+ end
get history_path(:format => "html", :list => "1"), :xhr => true
assert_response :success
assert_template "history"
assert_template :layout => "xhr"
assert_select "h2", :text => "Changesets", :count => 1
+ assert_select "link[rel='alternate'][type='application/atom+xml']", :count => 1 do
+ assert_select "[href=?]", "http://www.example.com/history/feed"
+ end
get history_path(:format => "html", :list => "1"), :xhr => true
assert_response :success
assert_template "history"
assert_template :layout => "map"
assert_select "h2", :text => "Changesets", :count => 1
+ assert_select "link[rel='alternate'][type='application/atom+xml']", :count => 1 do
+ assert_select "[href=?]", "http://www.example.com/history/feed?bbox=4.5%2C4.5%2C5.5%2C5.5"
+ end
get history_path(:format => "html", :bbox => "4.5,4.5,5.5,5.5", :list => "1"), :xhr => true
assert_response :success
get history_path(:format => "html", :display_name => user.display_name)
assert_response :success
assert_template "history"
+ assert_template :layout => "map"
+ assert_select "h2", :text => "Changesets by #{user.display_name}", :count => 1
+ assert_select "link[rel='alternate'][type='application/atom+xml']", :count => 1 do
+ assert_select "[href=?]", "http://www.example.com/user/#{ERB::Util.url_encode(user.display_name)}/history/feed"
+ end
get history_path(:format => "html", :display_name => user.display_name, :list => "1"), :xhr => true
assert_response :success