Sha256: e20e7f3d2ad932a6f1855a35aa04406b57a4983dd833bfdc99a7a258080a4ffb

Contents?: true

Size: 853 Bytes

Versions: 2

Compression:

Stored size: 853 Bytes

Contents

require 'spec_helper'

module Landable
  module Public
    describe SitemapController do
      routes { Landable::Engine.routes }

      it 'returns a 200 status' do
        get :index
        response.status.should == 200
      end

      it 'returns xml' do
        get :index
        response.content_type.should == 'application/xml'
      end

      it 'calls generate_sitemap with appropriate arguments' do
        Landable::Page.should_receive(:generate_sitemap).with(host: 'test.host',
                                                              protocol: 'https',
                                                              exclude_categories: ['Testing'],
                                                              sitemap_additional_paths: ['/terms.html']).and_call_original
        get :index, format: :xml
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
landable-1.14.0 spec/controllers/public/sitemap_controller_spec.rb
landable-1.13.2 spec/controllers/public/sitemap_controller_spec.rb