discourse/spec/controllers/robots_txt_controller_spec.rb

21 lines
482 B
Ruby
Raw Normal View History

require 'spec_helper'
describe RobotsTxtController do
context '.index' do
2013-02-25 17:58:16 -05:00
it "returns index when indexing is allowed" do
SiteSetting.stubs(:allow_index_in_robots_txt).returns(true)
get :index
2015-01-09 12:04:02 -05:00
expect(response).to render_template :index
end
it "returns noindex when indexing is disallowed" do
SiteSetting.stubs(:allow_index_in_robots_txt).returns(false)
get :index
2015-01-09 12:04:02 -05:00
expect(response).to render_template :no_index
2013-02-25 11:42:20 -05:00
end
end
end