check_feed_result([closed_changeset, changeset])
end
+ def test_feed_with_comment_tag
+ changeset = create(:changeset, :num_changes => 1)
+ create(:changeset_tag, :changeset => changeset, :k => "comment", :v => "tested-changeset-comment")
+
+ get history_feed_path(:format => :atom)
+ assert_response :success
+ assert_template "index"
+ assert_equal "application/atom+xml", response.media_type
+
+ check_feed_result([changeset])
+ end
+
##
# This should display the last 20 changesets closed in a specific area
def test_feed_bbox
assert_select "> entry", :count => changesets.size do |entries|
entries.zip(changesets) do |entry, changeset|
assert_select entry, "> id", :text => changeset_url(:id => changeset.id)
+
+ changeset_comment = changeset.tags["comment"]
+ if changeset_comment
+ assert_select entry, "> title", :count => 1, :text => "Changeset #{changeset.id} - #{changeset_comment}"
+ else
+ assert_select entry, "> title", :count => 1, :text => "Changeset #{changeset.id}"
+ end
+
assert_select entry, "> content > xhtml|div > xhtml|table" do
if changeset.tags.empty?
assert_select "> xhtml|tr > xhtml|td > xhtml|table", :count => 0