@@ -6,12 +6,12 @@ class SitemapHelperTest < ActionView::TestCase
66 @messages = [ ]
77 end
88
9- test 'get_sources with url only returns url only' do
9+ test 'parse_sitemap with url only returns url only' do
1010 url = 'https://test.com'
11- assert_equal @ingestor . send ( :get_sources , url ) , [ url ]
11+ assert_equal @ingestor . send ( :parse_sitemap , url ) , [ url ]
1212 end
1313
14- test 'get_sources returns parsed URLs from sitemap.xml' do
14+ test 'parse_sitemap returns parsed URLs from sitemap.xml' do
1515 sitemap_xml = <<~XML
1616 <?xml version="1.0" encoding="UTF-8"?>
1717 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@@ -27,11 +27,11 @@ class SitemapHelperTest < ActionView::TestCase
2727 stub_request ( :get , 'https://app.com/events/sitemap.xml' )
2828 . to_return ( status : 200 , body : sitemap_xml , headers : { 'Content-Type' => 'application/xml' } )
2929
30- urls = @ingestor . send ( :get_sources , 'https://app.com/events/sitemap.xml' )
30+ urls = @ingestor . send ( :parse_sitemap , 'https://app.com/events/sitemap.xml' )
3131 assert_equal [ 'https://app.com/events/123' , 'https://app.com/events/456' ] , urls
3232 end
3333
34- test 'get_sources returns parsed URLs from sitemap.txt' do
34+ test 'parse_sitemap returns parsed URLs from sitemap.txt' do
3535 sitemap_txt = <<~TXT
3636 https://app.com/events/123
3737 https://app.com/events/456
@@ -40,7 +40,7 @@ class SitemapHelperTest < ActionView::TestCase
4040 stub_request ( :get , 'https://app.com/events/sitemap.txt' )
4141 . to_return ( status : 200 , body : sitemap_txt , headers : { 'Content-Type' => 'txt' } )
4242
43- urls = @ingestor . send ( :get_sources , 'https://app.com/events/sitemap.txt' )
43+ urls = @ingestor . send ( :parse_sitemap , 'https://app.com/events/sitemap.txt' )
4444 assert_equal [ 'https://app.com/events/123' , 'https://app.com/events/456' ] , urls
4545 end
4646
0 commit comments