require 'test_helper' class LocationsControllerTest < ActionDispatch::IntegrationTest test 'should return a success code' do get '/locations.kml' assert_equal 200, status end test 'should return the right xml' do get '/locations.kml' assert_equal response.body, "\n\n \n \n NeonRoots Uruguay Office\n Zelmar Michelini 1290 Apto. 401 Esq. San José - Tel. 2909 0655\n \n -56.19006872177124,-34.907047903278404,0\n \n \n[{:name=>"NeonRoots Uruguay Office", :description=>"Zelmar Michelini 1290 Apto. 401 Esq. San José - Tel. 2909 0655", :coordinates=>"-56.19006872177124,-34.907047903278404,0"}]\n" end end