X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/93fb360a08e388997e402faa6d5804580b11b1c5..0d0498d303f36749cd48d8e6eadb1abafe3f828c:/test/controllers/notes_controller_test.rb?ds=sidebyside diff --git a/test/controllers/notes_controller_test.rb b/test/controllers/notes_controller_test.rb index b0fc3e1ee..5cdcbb31d 100644 --- a/test/controllers/notes_controller_test.rb +++ b/test/controllers/notes_controller_test.rb @@ -510,7 +510,11 @@ class NotesControllerTest < ActionController::TestCase 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") @@ -868,9 +872,24 @@ class NotesControllerTest < ActionController::TestCase 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