assert_equal "application/gpx+xml", @response.content_type
assert_select "gpx", :count => 1 do
assert_select "wpt[lat='#{notes(:open_note).lat}'][lon='#{notes(:open_note).lon}']", :count => 1 do
- assert_select "extension", :count => 1 do
+ assert_select "time", :count => 1
+ assert_select "name", "Note: #{notes(:open_note).id}"
+ assert_select "desc", :count => 1
+ assert_select "link[href='http://www.openstreetmap.org/note/#{notes(:open_note).id}']", :count => 1
+ assert_select "extensions", :count => 1 do
assert_select "id", notes(:open_note).id
assert_select "url", note_url(notes(:open_note), :format => "gpx")
assert_select "comment_url", comment_note_url(notes(:open_note), :format => "gpx")
def test_mine_success
get :mine, :display_name => "test"
assert_response :success
+ assert_select "table.note_list tr", :count => 2
get :mine, :display_name => "pulibc_test2"
assert_response :success
+ assert_select "table.note_list tr", :count => 3
+
+ get :mine, :display_name => "non-existent"
+ assert_response :not_found
+
+ session[:user] = users(:moderator_user).id
+
+ get :mine, :display_name => "test"
+ assert_response :success
+ assert_select "table.note_list tr", :count => 2
+
+ get :mine, :display_name => "pulibc_test2"
+ assert_response :success
+ assert_select "table.note_list tr", :count => 4
get :mine, :display_name => "non-existent"
assert_response :not_found