Sha256: 9db86e9cc64c87e69c4c2c6043415e268f0b1691a68ff5c697edf232e74db789
Contents?: true
Size: 806 Bytes
Versions: 2
Compression:
Stored size: 806 Bytes
Contents
require 'test_helper' class PostsControllerTest < ActionDispatch::IntegrationTest test 'should return a success code' do get '/post-sitemap.xml' assert_equal 200, status end test 'should return the right xml' do get '/post-sitemap.xml' assert_equal response.body, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:geo=\"http://www.google.com/geo/schemas/sitemap/1.0\">\n <url>\n <loc>http://www.example.com</loc>\n <lastmod>2016-09-22T18:11:05-03:00</lastmod>\n <changefreq>always</changefreq>\n <priority>1.0</priority>\n </url>\n\n <url>\n <loc>http://blog.neonroots.com/category/technology/test.html</loc>\n <lastmod>2016-09-22T18:11:05-03:00</lastmod>\n </url>\n</urlset>\n" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_sitemap-0.5.1 | test/integration/posts_test.rb |
rails_sitemap-0.5.0 | test/integration/posts_test.rb |